C caroline_81 Unregistered / Unconfirmed GUEST, unregistred user! 2003-04-26 #1 我现在做一个C-S模式系统,需要在client端非法操作时,屏蔽他的键盘!<br>请各位给予支持,多谢!
C cwmdelpher Unregistered / Unconfirmed GUEST, unregistred user! 2003-04-26 #2 先用SystemParametersInfo屏蔽ctrl+alt+del,后用keyboard hook <br>
C cwmdelpher Unregistered / Unconfirmed GUEST, unregistred user! 2003-04-26 #3 end;<br>屏蔽系统键:<br> systemparametersinfo(spi_screensaverrunning,1,nil,0);<br>打开系统键:<br> systemparametersinfo(spi_screensaverrunning,0,nil,0);
end;<br>屏蔽系统键:<br> systemparametersinfo(spi_screensaverrunning,1,nil,0);<br>打开系统键:<br> systemparametersinfo(spi_screensaverrunning,0,nil,0);
L LeeChange Unregistered / Unconfirmed GUEST, unregistred user! 2003-04-26 #4 function KeyboardHookProc(Code: Integer; wParam: WParam; lParam: LParam): LResult; stdcall;<br>begin<br> Result:=1<br>end;<br><br>function TForm1.Lock;<br>var<br> KeyboardHook: HHook;<br>begin<br> KeyboardHook:=SetWindowsHookEx(13, @KeyboardHookProc, HInstance, 0);<br>end
function KeyboardHookProc(Code: Integer; wParam: WParam; lParam: LParam): LResult; stdcall;<br>begin<br> Result:=1<br>end;<br><br>function TForm1.Lock;<br>var<br> KeyboardHook: HHook;<br>begin<br> KeyboardHook:=SetWindowsHookEx(13, @KeyboardHookProc, HInstance, 0);<br>end
L LeeChange Unregistered / Unconfirmed GUEST, unregistred user! 2003-04-26 #5 第一个函数写在单元的implementation部分就行了,<br>第二个一调用时键盘就锁住了.如果想从别的单元调用,就要写在interface部分或者Form的public部分,<br>但不一定非要是Form的方法.
第一个函数写在单元的implementation部分就行了,<br>第二个一调用时键盘就锁住了.如果想从别的单元调用,就要写在interface部分或者Form的public部分,<br>但不一定非要是Form的方法.