User32.dll

CallWindowProcA
CloseClipboard
EnableWindow
FindWindow
GetClassName
GetClipboardData
GetDC
GetForegroundWindow
GetParent
GetSystemMetrics
GetWindow
GetWindowLongPtr
GetWindowText
GetWindowThreadProcessId
IsClipboardFormatAvailable
OpenClipboard
PostMessage
ReleaseDC
SetClipboardData

Detect Key Stroke

link - http://www.cpearson.com/excel/keytest.aspx

Private Declare PtrSafe Function GetAsyncKeyState Lib "user32" (ByVal vKey As Long) As Integer 

Private Const VK_F9 = &H78

Sub WaitUntilF9Key()
Do Until GetAsyncKeyState(VK_F9)
    DoEvents
Loop
MsgBox "Hello World"
End Sub


© 2024 Better Solutions Limited. All Rights Reserved. © 2024 Better Solutions Limited TopPrevNext