[求助]关于键盘事件
怎么在程序不是激活的状态下也响应键盘事件? 说明:我那个键盘事件是属于窗体的,所以在窗体不是激活的状态下,我按键盘事件没有用。为什么腾讯的那个QQ,在不是激活的状态下,按Ctrl+Alt+Z就能把窗体显示出来,不知道它的那个是属于什么的键盘事件,应该怎么编那种键盘事件呀?有谁能告诉小弟一下?谢谢啦!
Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As IntPtr, ByVal wMsg As Int32, ByVal wParam As Int32, lParam As Int32) As Int32
Private Const WM_SETHOTKEY = &H32
Private Const HOTKEYF_ALT = &H4
Private Const HOTKEYF_CONTROL = &H2
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
SendMessage(Me.Handle, WM_SETHOTKEY, (HOTKEYF_ALT + HOTKEYF_CONTROL) * 2 ^ 8 + Asc("Z"), 0)
End Sub
对VB.NET有兴趣的加我
QQ:406485989
[此贴子已经被作者于2006-9-22 15:21:11编辑过]