[Tutorial]Using Hotkeys VB 08

Posts 1–3 of 3 · Page 1 of 1
[Tutorial]Using Hotkeys VB 08
This first did not work for me, when I had Windows XP Home edition, but now I have Windows XP Professional Edition, and now the hotkeys work!

So here is a tutorial.

First add these to your form
Code:
1 TextBox
1 Timer

Change Timer1 to Enabled = True


Code:

Code:
Public Class Form1
    Public Declare Function GetAsyncKeyState Lib "user32" (ByVal vKey As Long) As Integer
    Dim result As Integer

    Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
        If GetAsyncKeyState(Keys.F8) Then
            MsgBox("Hotkeys - Working")
        End If
    End Sub
And if that does not work, then try this one:

Code:
Public Class Form1
    Public Declare Function GetAsyncKeyState Lib "user64" (ByVal vKey As Long) As Integer
    Dim result As Integer

    Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
        If GetAsyncKeyState(Keys.F8) Then
            MsgBox("Hotkeys - Working")
        End If
    End Sub

If you have any problems, PM me, and make sure to tell me what you got in the error list.
*DO NOT POST HERE TO TELL ME IF PROBLEMS, I MAY NOT READ THIS MUCH!*
First code is for Windows 32bit and secound 64bit!
Didn't i already post this like a month ago....
wow...
-.-
Posts 1–3 of 3 · Page 1 of 1
This thread is closed for replies.

Similar Threads

Tags for this Thread

Talk with us