Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SendKeys 2

Status
Not open for further replies.

RexJacobus

Programmer
Dec 10, 2001
47
NZ
Can you send the windows key using SendKeys? It isn't listed in the VB Help for SendKeys.

jim
 
Try this:
Code:
Private Declare Sub keybd_event Lib "user32" (ByVal bVk As Byte, _
    ByVal bScan As Byte, ByVal dwFlags As Long, ByVal dwExtraInfo As Long)
Private Const VK_LWIN = &H5B
Private Const KEYEVENTF_KEYUP = &H2

Sub WindowsKey()
    keybd_event VK_LWIN, 0, 0, 0
    keybd_event VK_LWIN, 0, KEYEVENTF_KEYUP, 0
End Sub
hope this helps
Andreas
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top