Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
Hi Guys
Im trying to make a program in VB6 that will run and stay in focus no matter what.Basically it will be used to control access to a computer, kind of like the lock computer function in windows NT/2k/XP etc but it will be used with a swipe card system and be used to charge for time-based access.
The problem i face is that the windows key and CTRL+ALT+DEL along with other various key combos (ie: ALT+ESC) will make the program loose focus and bring up the start menu.
I can keep the program on top but i cant stop access to start menu.
I only want the windows key, C+A+D etc to be disabled when the program is running otherwise i could do registry hacks.
I have tried making it a screensaver and that still allows things to happen.
Any ideas?
Thanks
Matt

This is an API function.
Something like SetWindowsPos() (not sure),
where u can specific the Z-Order of the window.Make it top most. That should solve the problem.
Sam
Samuel Roshan

heya byrnesit,
I assume you are creating an app in "Kisok" mode, where no one can exit, or get access to the Windows operating system.
If you do this, you'll have to set up some sort of "administrative exit" with a textbox prompting for a password code to exit. Otherwise, you'll be trapped too!
Then, you can trap the keystrokes using user32 and kernel32 API calls.
This works with Windows NT 4.0 SP3 and later, but Win9x and ME are unsupported. Have a look:
http://vbnet.mvps.org/index.html?code/hooks/lowlevelkeyboardproc.htm

![]() |
![]() |
![]() |

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |