Disable/enable keyboard via VB 
Author Message
 Disable/enable keyboard via VB

Is there as way via VB (or a batch file I could shell) to totally disable
the keyboard (and perhaps the mouse too)?

By totally disable, I mean that it acts as though unplugged or as close to
that as possible (ie. so that even cntrl-alt-del doesn't work and there's
no way to quit the frontmost VB app from the keybaord).

It's for a public kiosk, and I need the frontmost app to act as as a log-in
screen which cannot be quit or hidden until a user logs in (the log-in is
done via a serial device). Thus, I'd like to "turn off" the keyboard until
a user logs in via the serial device, and then "turn on" the keyboard again
for that session.

I'm a bit of a newbie when it comes to VB and Win95, so *any* help would be
greatly appreciated.



Wed, 08 Nov 2000 03:00:00 GMT  
 Disable/enable keyboard via VB

I had to make a security program much like what you describe.  What I did
was use the SetWindoPos API to put my app on top; then I hid all other
programs, incase one of them decided to pop up; Then I tricked Windows into
thinking the screen saver was running so the ctrl+alt+del, Start key, etc...
where all disabled.  I also placed a value in the registry and I only
changed it if the program exited properly (ie, the power wasn't reset), and
when Windows started, using the RunService Key, I ran my program and checked
for that value.

Hope that helps,
Bodi Klamph
Azure Dragon Software

Quote:

>Is there as way via VB (or a batch file I could shell) to totally disable
>the keyboard (and perhaps the mouse too)?

>By totally disable, I mean that it acts as though unplugged or as close to
>that as possible (ie. so that even cntrl-alt-del doesn't work and there's
>no way to quit the frontmost VB app from the keybaord).

>It's for a public kiosk, and I need the frontmost app to act as as a log-in
>screen which cannot be quit or hidden until a user logs in (the log-in is
>done via a serial device). Thus, I'd like to "turn off" the keyboard until
>a user logs in via the serial device, and then "turn on" the keyboard again
>for that session.

>I'm a bit of a newbie when it comes to VB and Win95, so *any* help would be
>greatly appreciated.

begin 666 Bodi Klamph.vcf
M0D5'24XZ5D-!4D0-"E9%4E-)3TXZ,BXQ#0I..DML86UP:#M";V1I#0I&3CI"
M;V1I($ML86UP: T*14U!24P[4%)%1CM)3E1%4DY%5#I"2VQA;7!H0$%Z=7)E

`
end


Wed, 08 Nov 2000 03:00:00 GMT  
 Disable/enable keyboard via VB

You can use the Keypress Event to change the ascii code when keys are
pressed.  then maybe used some kind of boolean to find out if they log in.
Use something like this in key press events:

If Not blnLoggedIn Then KeyAscii = 0

This should take every key stroke to zero until the boolean is set true

HTH,
Lorrin L. Williams
Karma Komputing

Quote:

>Is there as way via VB (or a batch file I could shell) to totally disable
>the keyboard (and perhaps the mouse too)?

>By totally disable, I mean that it acts as though unplugged or as close to
>that as possible (ie. so that even cntrl-alt-del doesn't work and there's
>no way to quit the frontmost VB app from the keybaord).

>It's for a public kiosk, and I need the frontmost app to act as as a log-in
>screen which cannot be quit or hidden until a user logs in (the log-in is
>done via a serial device). Thus, I'd like to "turn off" the keyboard until
>a user logs in via the serial device, and then "turn on" the keyboard again
>for that session.

>I'm a bit of a newbie when it comes to VB and Win95, so *any* help would be
>greatly appreciated.



Wed, 08 Nov 2000 03:00:00 GMT  
 Disable/enable keyboard via VB


Quote:

> I had to make a security program much like what you describe.  What I did
> was use the SetWindoPos API to put my app on top; then I hid all other
> programs, incase one of them decided to pop up; Then I tricked Windows into
> thinking the screen saver was running so the ctrl+alt+del, Start key, etc...
> where all disabled.  I also placed a value in the registry and I only
> changed it if the program exited properly (ie, the power wasn't reset), and
> when Windows started, using the RunService Key, I ran my program and checked
> for that value.

The screensaver bit was *exactly* what I was looking for. I hadn't thought
of using the registry as you've mentioned above, and that's a good idea as
well.

Thanks!



Mon, 13 Nov 2000 03:00:00 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Disable/Enable mouse and keyboard

2. Disable/Enable mouse and keyboard

3. Enable/Disable mouse clicks and keyboard key clicks

4. How to disable/enable keyboard input and mouse input

5. How to disable/enable keyboard

6. Enabling & Disable keyboard signal

7. Enable/Disable mouse clicks and keyboard

8. Disabling/Enabling Keyboard + Mouse

9. How to disabled/enabled keyboard input ?

10. enable / disable tasks via script

11. way to enable/disable NIC via script or ???

12. How to disable-Enable Local area Connection via script

 

 
Powered by phpBB® Forum Software