Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Locking user to the application

Posted on 1999-06-28
8
Medium Priority
?
173 Views
Last Modified: 2010-05-02
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.
0
Comment
Question by:umeshkhoje
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
  • 2
  • +1
8 Comments
 
LVL 2

Expert Comment

by:BeedleGuis
ID: 1520376
can you use a system modal msgbox?  or do you need the user locked in throughout the whole time the app is running?
0
 
LVL 2

Accepted Solution

by:
BeedleGuis earned 200 total points
ID: 1520377
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
 

Author Comment

by:umeshkhoje
ID: 1520378
I need to lock the user throughout the application.

0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:umeshkhoje
ID: 1520379
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
 

Expert Comment

by:kazraver
ID: 1520380
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
 
LVL 10

Expert Comment

by:caraf_g
ID: 1520381
You can't do this - Windows is a MULTI-TASKING operating system.
0
 

Expert Comment

by:kazraver
ID: 1520382
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
 
LVL 10

Expert Comment

by:caraf_g
ID: 1520383
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

Featured Post

On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Suggested Courses

722 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question