# Function Reference

# _ClipBoard_Close

Closes the clipboard

#include <Clipboard.au3>
_ClipBoard_Close ( )

## Return Value

Success: | True
Failure: | False

## Remarks

When the window has finished examining or changing the clipboard close the clipboard by calling this function.
This enables other windows to access the clipboard. Do not place an object on the clipboard after calling this function.

## Related

_ClipBoard_Open

## See Also

Search CloseClipboard in MSDN Library.

## Example

    #include "Extras\HelpFileInternals.au3"

    #include <Clipboard.au3>
    #include <GUIConstantsEx.au3>
    #include <WinAPIError.au3>
    #include <WindowsStylesConstants.au3>

    Example()

    Func Example()
        Local $hGUI

        ; Create GUI
        $hGUI = GUICreate("Clipboard", 600, 400)
        _MemoCreate(2, 2, 596, 396, $WS_VSCROLL)
        GUISetState(@SW_SHOW)

        ; Open the clipboard
        If Not _ClipBoard_Open($hGUI) Then _WinAPI_ShowError("_ClipBoard_Open failed")

        ; Show clipboard formats available
        _MemoWrite("Clipboard formats ..: " & _ClipBoard_CountFormats())

        ; Empty the clipboard
        If Not _ClipBoard_Empty() Then _WinAPI_ShowError("_ClipBoard_Empty failed")

        ; Show clipboard formats available
        _MemoWrite("Clipboard formats ..: " & _ClipBoard_CountFormats())

        ; Close the clipboard
        _ClipBoard_Close()

        ; Loop until the user exits.
        Do
        Until GUIGetMsg() = $GUI_EVENT_CLOSE
    EndFunc   ;==>Example