VBcoders Browse New Submit Contact Sign In

No account? Register free

Forgot password?

Creates a hotkey for your program

Sam Huggill  (7 Submissions)   Custom Controls/Forms/Menus   Visual Basic 5.0   Unknown Difficulty   Wed 2nd June 1999   Mon 8th February 2021

Creates a hotkey for your program

API Declarations


"SendMessageA" (ByVal hwnd As Long, _
ByVal wMsg As Long, ByVal wParam As Long, _
lParam As Long) As Long

Declare Function DefWindowProc Lib "user32" _
Alias "DefWindowProcA" (ByVal hwnd As Long, _
ByVal wMsg As Long, ByVal wParam As Long, _
ByVal lParam As Long) As Long

Public Const WM_SETHOTKEY = &H32
Public Const WM_SHOWWINDOW = &H18
Public Const HK_SHIFTA = &H141 'Shift + A
Public Const HK_SHIFTB = &H142 'Shift * B
Public Const HK_CONTROLA = &H241 'Control + A
Public Const HK_ALTZ = &H45A

'The value of the key-combination has to
'declared in lowbyte/highbyte-format

'That means as a hex-number: the last two
'characters specify the lowbyte (e.g.: 41 = a),
'the first the highbyte (e.g.: 01 = 1 = Shift)

Rate Creates a hotkey for your program (1(1 Vote))
Creates a hotkey for your program.bas

Creates a hotkey for your program Comments

No comments yet — be the first to post one!

Post a Comment

0/1000 characters