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?

[Webinar] Streamline your web hosting managementRegister Today

x
 
BeedleGuisConnect With a Mentor Commented:
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
 
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
 
umeshkhojeAuthor Commented:
I need to lock the user throughout the application.

0
The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

 
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
All Courses

From novice to tech pro — start learning today.