For Programmers: Free Programming Magazines  


Home > Archive > Visual Basic > March 2006 > Unlocking a keyboard









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Unlocking a keyboard
GwenP

2006-03-29, 6:56 pm

Does anyone have any code to unlock a keyboard?

I have code to lock a keyboard which I can do at the end of a program,
however for it to work I need to unlock the keyboard at the beginning of the
program as it has keyboard events in it - it does not run if the keyboard is
locked and I need to keep the keyboard locked whilst the program is not doing
anything.

GwenP
Gman

2006-03-29, 6:56 pm

I guess it depends how you've locked the keyboard... why not post the
code you've used to lock it?

GwenP wrote:
> Does anyone have any code to unlock a keyboard?
>
> I have code to lock a keyboard which I can do at the end of a program,
> however for it to work I need to unlock the keyboard at the beginning of the
> program as it has keyboard events in it - it does not run if the keyboard is
> locked and I need to keep the keyboard locked whilst the program is not doing
> anything.
>
> GwenP

MikeD

2006-03-29, 6:56 pm


"GwenP" <GwenP@discussions.microsoft.com> wrote in message
news:DAC1B184-EFC2-423F-B239-F170057D9E23@microsoft.com...
> Does anyone have any code to unlock a keyboard?
>
> I have code to lock a keyboard which I can do at the end of a program,
> however for it to work I need to unlock the keyboard at the beginning of
> the
> program as it has keyboard events in it - it does not run if the keyboard
> is
> locked and I need to keep the keyboard locked whilst the program is not
> doing
> anything.
>



I didn't even know you could "lock" a keyboard. Are you talking about a
system-wide keyboard hook you've implemented in your program and by
"locking" the keyboard, you're just eating all keyboard messages?

--
Mike
Microsoft MVP Visual Basic

J French

2006-03-30, 3:55 am

On Wed, 29 Mar 2006 08:11:02 -0800, =?Utf-8?B?R3dlblA=?=
<GwenP@discussions.microsoft.com> wrote:

>Does anyone have any code to unlock a keyboard?
>
>I have code to lock a keyboard which I can do at the end of a program,
>however for it to work I need to unlock the keyboard at the beginning of the
>program as it has keyboard events in it - it does not run if the keyboard is
>locked and I need to keep the keyboard locked whilst the program is not doing
>anything.


I'm surprized you have something for locking a keyboard

I looked into it a fewc days ago and came up with nothing

- if we can see how you are locking it, then we should be able to
figure out how to unlock it
GwenP

2006-03-30, 7:55 am

The code I found to download at the bottom of this link

http://gethelp.devx.com/techtips/nt...minNT0701-5.asp

It locks the workstation every time, but as it seem to use API calls and
stuff I'm not that familiar with I can;t kind of just do the opposite of it
to unlock the keyboard and my exe will not run when they keyboard is lock?
Unless anyone knows how t omake an exe work with keyboard events on a locked
workstation.

Thanks
GwenP

"J French" wrote:

> On Wed, 29 Mar 2006 08:11:02 -0800, =?Utf-8?B?R3dlblA=?=
> <GwenP@discussions.microsoft.com> wrote:
>
>
> I'm surprized you have something for locking a keyboard
>
> I looked into it a fewc days ago and came up with nothing
>
> - if we can see how you are locking it, then we should be able to
> figure out how to unlock it
>

J French

2006-03-31, 3:55 am

On Thu, 30 Mar 2006 02:20:02 -0800, =?Utf-8?B?R3dlblA=?=
<GwenP@discussions.microsoft.com> wrote:

>The code I found to download at the bottom of this link
>
>http://gethelp.devx.com/techtips/nt...minNT0701-5.asp
>
>It locks the workstation every time, but as it seem to use API calls and
>stuff I'm not that familiar with I can;t kind of just do the opposite of it
>to unlock the keyboard and my exe will not run when they keyboard is lock?
>Unless anyone knows how t omake an exe work with keyboard events on a locked
>workstation.


So you are using the LockWorkStation API ?

That pops up a password window doesn't it ?

Not really locking the keyboard ...
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com