全局热键的问题。
要实现的功能为:按F11停止,按F10运行repeat...until中间的代码,编译时按F10能执行repeat...until之间的代码,但按下F11后并不会停止,没有跳出循环,仍然执行repeat...until中间的代码,我这样做为什么不行?各位大虾有会好办法没?
F10 F11已经注册为热键。
procedure TForm1.hotkey(var msg:tmessage); //热键响应事件
var
bool:boolean;
begin
if msg.LParamHi=vk_f11
then bool:=true;
if msg.LParamHi=vk_f10
then begin
repeat
.....
until bool=true;
end;
end;