function HookProc(nCode:Integer;WParam: WPARAM;LParam:LPARAM):LRESULT;stdcall;
begin
Result :=0; if nCode<0 then
Result := CallNextHookEx(hHk,nCode,WParam,LParam)
else
begin
GetKeyboardState(kbArray); if (bShow=False) And (kbArray[myKey]=1) then
begin
bShow:=True;
if createFlag=False then
begin
Form16:=TForm16.Create(Application);
createFlag:=True;
end
else
begin
Form16.Visible:=not(Form16.Visible);
end;
ShowCursor(true);
end
else
begin
Result := CallNextHookEx(hHk,nCode,WParam,LParam);
end;
bShow:=False;
end;
end; 请问为什么我得按两次f7才能显示/隐藏啊? 哪写的不对么? 谢谢!
begin
Result :=0; if nCode<0 then
Result := CallNextHookEx(hHk,nCode,WParam,LParam)
else
begin
GetKeyboardState(kbArray); if (bShow=False) And (kbArray[myKey]=1) then
begin
bShow:=True;
if createFlag=False then
begin
Form16:=TForm16.Create(Application);
createFlag:=True;
end
else
begin
Form16.Visible:=not(Form16.Visible);
end;
ShowCursor(true);
end
else
begin
Result := CallNextHookEx(hHk,nCode,WParam,LParam);
end;
bShow:=False;
end;
end; 请问为什么我得按两次f7才能显示/隐藏啊? 哪写的不对么? 谢谢!
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货