好啊。。这么多大洋。。我全包了啊。。^_^ 我就辛苦点了,你在程序里加个钩子,搞掉Ctrl+C(复制)和Ctrl+V(粘贴)
代码如下:(直接copy后试一试吧。。很爽的)
function KeyboardHook(nCode: Integer; wParam: WPARAM;
lParam: LPARAM): LResult; stdcall;
var
Form1: TForm1;
WinHook: HHOOK; // a handle to the keyboard hook function
implementation
{$R *.DFM}
procedure TForm1.FormCreate(Sender: TObject);
begin
//上个钩子
WinHook:=SetWindowsHookEx(WH_KEYBOARD, @KeyboardHook, 0, GetCurrentThreadID);
end;
procedure TForm1.FormDestroy(Sender: TObject);
begin
//脱钩
UnhookWindowsHookEx(WinHook);
end;
function KeyboardHook(nCode: Integer; wParam: WPARAM; lParam: LPARAM): LResult;
const
_KeyPressMask = $80000000;
begin
{if we can process the hook information...}
if (nCode>-1) then
// 侦测 Ctrl + C 组合键
if ((lParam and _KeyPressMask) = 0) and
(GetKeyState(vk_Control) < 0) and ((wParam = Ord('C')) or (wParam = Ord('V'))) then
begin
Result := 1;
end
else
Result := 0
else
Result := CallNextHookEx(WinHook, nCode, wParam, lParam);
end;