|
|

Clearing the Clipboard using API calls
If you want to clear data from the clipboard, then you can use three API calls in sequence, to open, clear, and then close the clipboard:
Private Declare Function apiOpenClipboard Lib "user32" Alias "OpenClipboard" _
(ByVal hwnd As Long) As Long
Private Declare Function apiEmptyClipboard Lib "user32" Alias "EmptyClipboard" _
() As Long
Private Declare Function apiCloseClipboard Lib "user32" Alias "CloseClipboard" _
() As Long
Public Sub sClearClipboard()
On Error GoTo E_Handle
Dim lngReturn As Long
lngReturn = apiOpenClipboard(Application.hWndAccessApp)
lngReturn = apiEmptyClipboard
lngReturn = apiCloseClipboard
sExit:
On Error Resume Next
Exit Sub
E_Handle:
MsgBox Err.Description & vbCrLf & "sClearClipboard", vbOKOnly + vbCritical, "Error: " & Err.Number
Resume sExit
End Sub
|
Top
HOME |
NEW |
TABLES |
QUERIES |
FORMS |
REPORTS |
GENERAL |
API |
DOWNLOADS |
TUTORIAL |
RESOURCES
E-MAIL
Copyright & Disclaimer
|
| |