Quelltext
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12:
| function BlockInput (fBlockInput : boolean) : DWord; stdcall; external 'user32.DLL';
procedure TForm1.Button1Click(Sender: TObject); begin BlockInput(true); SystemParametersInfo(97,Word(True),nil,0); end;
procedure TForm1.Timer1Timer(Sender: TObject); begin SystemParametersInfo(97,Word(False),nil,0); end; |
So kannste Usereingaben blocken, d.h. die Maus kann nicht mehr bewegt werden etc.. Wie man sieht, habe ich einen Timer verwendet, um das Blocken rückgängig zu machen. Das ist allerdings eine nicht sehr empfehlenswerte Methode.
Ich denke mal, dass du eher so eine Artpasswortabfrage haben willst. Dazu müssteste aber Strg-Alt-Entf unterdrücken und das ist soweit ich weiss unter Windows 2000 nicht möglich außer durch Modifizierung der User32.dll.