Press The Start Button

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

Tags:

Vb.Net

Add comment


(Will show your Gravatar icon)

  Country flag

biuquote
  • Comment
  • Preview
Loading



About ETS...

Enurac Technology Solutions is a one stop software development company for implementing your business idea as a software solution. You can rely on us to give your company a cutting edge, as we use the most efficient, flexible and cost-effective approach to software development.