how i can lock my keyboard

issamtaher
issamtaher used Ask the Experts™
on
hi

i want lock my keyboard to deny user from using my pc

plz
help me
ASAP..
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®

Commented:
How would you get access to your pc?

Commented:
2000 allows you to "lock" your system until you enter the administrators password, I'm sure XP would allow this too.

Author

Commented:
not win2000 lock

like frezing my pc
and by other events i can Unlock my pc

Exploring SQL Server 2016: Fundamentals

Learn the fundamentals of Microsoft SQL Server, a relational database management system that stores and retrieves data when requested by other software applications.

Commented:
In win9X/Me you can lock the systems keyboard, but if you're using 2000 or XP, you can always CTRL-ALT-DELETE

What OS are you running?

Author

Commented:
win 2000

Commented:
You can't do it in windows 2000. The best you can do is either to set up permissions or use the internal "lock", but you can't intercept a ctrl-alt-delete due to the way nt based windows run
Commented:
/ Import BlockInput function form user32.dll:
             

                   function BlockInput (fBlockInput : boolean) : DWord; stdcall; external 'user32.DLL';

                   {block input}

                   procedure TForm1.Button1Click(Sender: TObject);
                   begin
                    BlockInput(true);
                   end;

                   {unblock input / Blockierung aufheben}

                   procedure TForm1.Button2Click(Sender: TObject);
                   begin
                    BlockInput(false);
                   end;


                   Note:  Requires Windows 98/2000 or later.
                          You can unblock input by pressing    
                          CTRL+ALT+DEL  


{
If you wish to disable those keys while your
application is running call SystemKeys:
When you call SystemKeys, if Disable is True,
the keys will be disabled, False otherwise.
}
   
procedure SystemKeys(Disable: Boolean);
var OldVal : LongInt;
begin
SystemParametersInfo(SPI_SCREENSAVERRUNNING,
                     Word(Disable), @OldVal, 0);
end  
Commented:
You can use this code but at your own risks :
---------------------------------------------
uses WinProcs;

procedure DisableCtrlAlDel;
var
   Dummy : integer;
begin
  Dummy := 0;
  {Disable ALT-TAB}
  SystemParametersInfo( SPI_SETFASTTASKSWITCH, 1, @Dummy, 0);
  {Disable CTRL-ALT-DEL}
  SystemParametersInfo( SPI_SCREENSAVERRUNNING, 1, @Dummy, 0);
end;

It will lock these key combinations, but be careful...

Hope this helps,
DjamD
 Thank you gimsonic and issamtaher for the tips :) They are too good to be true. I am developing a software for a LAN house that blocks the mouse and keyboard input after the time has expired :) I was dealing with a couple of problems using Windows Hooks, but this is definitively easier. Thank you again
coldmail@bol.com.br
Ooops, I wanna thanks gimsonic and DjamD for the answers, and issamtaher for the question (correcting my last post)
And sorry for my horrible english

Commented:
Glad to can help you :)
issamtaher:
This old question needs to be finalized -- accept an answer, split points, or get a refund.  For information on your options, please click here-> http:/help/closing.jsp#1 
EXPERTS:
Post your closing recommendations!  No comment means you don't care.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial