VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Simplified Hotkey Example

by Liquibit (1 Submission)
Category: Windows API Call/Explanation
Compatability: Visual Basic 3.0
Difficulty: Beginner
Date Added: Wed 3rd February 2021
Rating: (5 Votes)

Shows how to emplement a hotkey globally. This example uses the ` key (192).

API Declarations
'Add To Module
Declare Function GetAsyncKeyState Lib "user32" (ByVal vKey As Long) As Integer

Rate Simplified Hotkey Example

'Add To A Timer With An Interval Of 1
keyresult = GetAsyncKeyState(192)
 If keyresult = 0 Then Exit Sub
 If keyresult = -32767 Then
  MsgBox "The ` key was pressed."
 End If

Download this snippet    Add to My Saved Code

Simplified Hotkey Example Comments

No comments have been posted about Simplified Hotkey Example. Why not be the first to post a comment about Simplified Hotkey Example.

Post your comment

Subject:
Message:
0/1000 characters