bu kodu sadece klevyeyi kapatacak şekilde nesıl değiştiririz
teşekkürler
Kod: Tümünü seç
function FunctionDetect(LibName, FuncName: string; var LibPointer: Pointer): Boolean;
var
LibHandle: THandle;
begin
Result := False;
LibPointer := nil;
if LoadLibrary(PChar(LibName)) = 0 then Exit;
LibHandle := GetModuleHandle(PChar(LibName));
if LibHandle <> 0 then
begin
LibPointer := GetProcAddress(LibHandle, PChar(FuncName));
if LibPointer <> nil then Result := True;
end;
end;
Kod: Tümünü seç
procedure TForm1.Panel4Click(Sender: TObject);
var
xBlockInput: function (Block: BOOL): BOOL; stdcall;
begin
if FunctionDetect('USER32.DLL', 'BlockInput', @xBlockInput) then
begin
xBlockInput(True); // klavye ve mouse yi iptal et
Sleep(10000); // 10 saniye bekle
xBlockInput(False); // klavye ve mouse yi aktif et
end;
end;