Hi all
Can anybody suggest a very simple system-wide hotkey?
A bit of Example code is what I am looking for
Thanks in advance
Farhana
Public Declare Auto Function SendMessage Lib "user32.dll" (ByVal hWnd As
IntPtr, ByVal wMsg As Int32, ByVal wParam As Int32, ByVal s As String)
As Int32
Const WM_SETHOTKEY As Long = &H32
Const HotKey_Alt_F12 As Long = &H47B
Private Sub MainFrm_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
SendMessage(Me.Handle, WM_SETHOTKEY, HotKey_Alt_F12, 0)
End Sub
This example will create a system-wide Hotkey combination of Alt-F12.
Press this combination and your application will be given the focus,
even if it's been minimized. (Watch for wrapping)
Hope this helps.
ShaneO
There are 10 kinds of people - Those who understand Binary and those who
don't.