定义了两个系统级的热键为什么只有一个可以用???(5分)

  • 主题发起人 主题发起人 cjdbd
  • 开始时间 开始时间
C

cjdbd

Unregistered / Unconfirmed
GUEST, unregistred user!
aatom:=globaladdatom('hot key');<br>RegisterHotKey(handle,aatom,MOD_ALT,vk_f12);<br>aatom1:=globaladdatom('hot key');<br>RegisterHotKey(handle,aatom1,MOD_ALT,vk_f11);<br>1.<br>程序运行之后,只有alt+f11这可以被响应,<br>第现一个alt+f12却不能用??<br>2.<br>if (msg.LParamLo=MOD_ALT) and (msg.LParamHi=VK_F12) then<br>&nbsp; &nbsp; &nbsp;begin<br>&nbsp; &nbsp; &nbsp; &nbsp;if messagebox(application.Handle,'dddd','yyyy',MB_OKCANCEL)=IDOK then<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; timer1.Enabled:=false;<br>&nbsp; &nbsp; &nbsp;end;<br><br>&nbsp; &nbsp;if (msg.LParamLo=MOD_ALT) and (msg.LParamHi=VK_F11) then<br>&nbsp; &nbsp; &nbsp;begin<br>&nbsp; &nbsp; &nbsp; &nbsp;if messagebox(application.Handle,'kkkk','uuuuuu',MB_OKCANCEL)=IDOK then<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; timer1.Enabled:=true;<br>&nbsp; &nbsp; &nbsp;end;<br>用messagebox弹出的对话框总在后面???<br>如何让它在最前面
 
哪个能说是怎么回事啊???
 
哪个能解决啊??
 
问题应该出在字符串常量上,把第二个改为:<br>aatom1:=globaladdatom('The 2nd hot key');<br>试试!
 
接受答案了.
 
后退
顶部