E
E_SHARK
Unregistered / Unconfirmed
GUEST, unregistred user!
我在两个不同的程序中定义了相同的热键,但是总是第一个启动的程序对热键又反应,不明白是怎么会事情,请高手指导,代码如下:<br> procedure hotykey(var msg:TMessage); message WM_HOTKEY;<br> YZIEMID:=GLOBALADDATOM('HOTKEY1');<br> REGISTERHOTKEY(HANDLE,YZIEMID,MOD_CONTROL,VK_F1);<br>procedure TFrms_Main.hotykey(var msg: TMessage);<br>begin<br><br> IF (MSG.LPARAMLO=MOD_CONTROL) AND (MSG.LPARAMHI=VK_F1)<br> AND (APPLICATION.Title ='1') THEN<br> BEGIN<br> IF MYHOS.SJLX ='1' THEN<br> BEGIN<br> FRMS_MAIN.SB1.PANELS[1].TEXT:='速记法:拼音';<br> MYHOS.SJLX:='2';<br> EXIT;<br> END;<br> IF MYHOS.SJLX ='2' THEN<br> BEGIN<br> FRMS_MAIN.SB1.PANELS[1].TEXT:='速记法:中文';<br> MYHOS.SJLX:='3';<br> EXIT;<br> END;<br><br> IF MYHOS.SJLX ='3' THEN<br> BEGIN<br> FRMS_MAIN.SB1.PANELS[1].TEXT:='速记法:五笔';<br> MYHOS.SJLX:='1';<br> EXIT;<br> END;<br> END;<br><br>end;