by enurac
6. January 2011 18:28
'Add a module to your project (In the menu choose Project -> Add Module, Then click Open)
'Add 1 CommandButton (named Command1) to your form.
'Insert this code to the module :
Declare Function MapVirtualKey Lib "user32" Alias "MapVirtualKeyA" _
(ByVal wCode As Long, ByVal wMapType As Long) As Long
Declare Sub keybd_event Lib "user32" (ByVal bVk As Byte, ByVal bScan _
As Byte, ByVal dwFlags As Long, ByVal dwExtraInfo As Long)
Public Const KEYEVENTF_KEYUP = &H2
'Insert this code to your form:
Private Sub Command1_Click()
Const MENU_KEYCODE = 91
keybd_event MENU_KEYCODE, 0, 0, 0
keybd_event MENU_KEYCODE, 0, KEYEVENTF_KEYUP, 0
End Sub
fa6add20-28bc-44bd-b768-38c6359ecbd1|0|.0
Tags:
Vb.Net