G gbh Unregistered / Unconfirmed GUEST, unregistred user! 2002-04-07 #1 [blue]我在桌面上建立了一个快捷方式,并指定了快捷键。<br>怎样发 WM_SETHOTKEY 消息才能使系统能立即响应这个快捷键?[/blue]
G gbh Unregistered / Unconfirmed GUEST, unregistred user! 2002-04-09 #3 请给出一个确实可行的例子。<br>因为我曾用了别人的某个例子(当然是send WM_SETHOTKEY消息),一点用也没有。
Z zxb200 Unregistered / Unconfirmed GUEST, unregistred user! 2002-04-12 #4 設快捷键為ctrl+f4<br> keybd_event(VK_CONTROL,MapVirtualKey(VK_CONTROL,0),KEYEVENTF_EXTENDEDKEY,0);<br> keybd_event(VK_F4,0,KEYEVENTF_EXTENDEDKEY,0);<br> keybd_event(VK_F4,0,KEYEVENTF_KEYUP,0);<br> keybd_event(VK_CONTROL,MapVirtualKey(VK_CONTROL,0),KEYEVENTF_KEYUP,0);
設快捷键為ctrl+f4<br> keybd_event(VK_CONTROL,MapVirtualKey(VK_CONTROL,0),KEYEVENTF_EXTENDEDKEY,0);<br> keybd_event(VK_F4,0,KEYEVENTF_EXTENDEDKEY,0);<br> keybd_event(VK_F4,0,KEYEVENTF_KEYUP,0);<br> keybd_event(VK_CONTROL,MapVirtualKey(VK_CONTROL,0),KEYEVENTF_KEYUP,0);
L liutp Unregistered / Unconfirmed GUEST, unregistred user! 2002-05-18 #5 用RegisterHotKey()<br>如注册 alt+esc<br>if not(RegisterHotKey(handle, 27, MOD_ALT, VK_ESCAPE)) then<br> ShowMessage('Register HotKey Failed!');<br>
用RegisterHotKey()<br>如注册 alt+esc<br>if not(RegisterHotKey(handle, 27, MOD_ALT, VK_ESCAPE)) then<br> ShowMessage('Register HotKey Failed!');<br>
G gbh Unregistered / Unconfirmed GUEST, unregistred user! 2002-05-21 #6 我自己找到了正确的答案:<br>SendMessage(HWND_BROADCAST,WM_WININICHANGE,0,0);