Sazor98 (02-16-2013),yousefaliq (03-01-2013)
Hello !
How to make a visual basic hotkey with a timer and some screen shots ..etc !!
It's an easy tutorial but we want to test it first before use it on your own project for no get errors and no destroy your project if you did some wrong thing in coding ....
1-Open visual basic [ No need screen shots ]
2-New project and name it any name u want [ No need screen shots ]
3-Add 1 button and 1 timer [ No need screen shots ]
3-name the button ''test [ No need screen shots ]
5-Go to timer properties and make timer enabled = True :
6-Go to Form1 and ''Public class form1'' and below that code put this code :
6-Go and code button !! and write :Code:<System.Runtime.InteropServices.DllImport("user32.dll")> _ Private Shared Function GetAsyncKeyState(ByVal vkey As System.Windows.Forms.Keys) As Short End Function
[for if the hotkey worked you will know !]Code:MsgBox("Hotkey working !!")
7-Go and code timer !! and write :
Code:Dim hotkey As Boolean hotkey = GetAsyncKeyState(Keys.KeyName) If hotkey = True Then ButtonNumber.PerformClick() End If
All code :
All Form :
Hope this tutorial help you !!
Sazor98 (02-16-2013),yousefaliq (03-01-2013)
Better make a button trainer .
This tutorial suck . We need a tutorial of hotkey . Not button .