Locking user to the application

I wish to lock the user to the application untill he exists from the application. Can somebody help me in doing this?
The user should not be able to launch any other application from the start bar or the task bar.
umeshkhojeAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

BeedleGuisCommented:
can you use a system modal msgbox?  or do you need the user locked in throughout the whole time the app is running?
0
BeedleGuisCommented:
one possibility is to maximize you app and use
the following code to keep it on top:

Private Declare Function SetWindowPos Lib "user32" (ByVal hwnd As Long, ByVal hWndInsertAfter As Long, ByVal x As Long, ByVal y As Long, ByVal cx As Long, ByVal cy As Long, ByVal wFlags As Long) As Long

Private Const HWND_TOPMOST = -1
Private Const SWP_NOSIZE = &H1
Private Const SWP_NOMOVE = &H2

'Form Load event

Private Sub Form_Load()
SetWindowPos Me.hwnd, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOSIZE Or SWP_NOMOVE
End Sub

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
umeshkhojeAuthor Commented:
I need to lock the user throughout the application.

0
The Ultimate Tool Kit for Technolgy Solution Provi

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy for valuable how-to assets including sample agreements, checklists, flowcharts, and more!

umeshkhojeAuthor Commented:
I cant use the system modal message box as I have the user interface. Its simple, Once the user has started with my application he should not be able to run any other application on the machine untill he exists from my application.
0
kazraverCommented:
Try limiting the mouse movement to the constrants of the application form(s). When you need to show a dialog you will need to lock the mouse in again.
You will also need to lock certain keys on the keyboard etc, to stop people using the windows keys.

0
caraf_gCommented:
You can't do this - Windows is a MULTI-TASKING operating system.
0
kazraverCommented:
caraf_gv: I do this at the moment! you can lock the mouse to a specified area, and lock several keys, like CTRL, ALT and DEL to prevent the user from breaking out.


0
caraf_gCommented:
Sorry, my mistake. You *should* not do this, rather than you *can't* do this. If I were given an application that took control of my computer I would uninstall it.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic Classic

From novice to tech pro — start learning today.