Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Lock Focus On a Form

Status
Not open for further replies.

TGrahmann

Programmer
Feb 19, 2015
43
US
Hello, I am wondering if there is a way to lock focus on one form. I.E.: If I try to navigate to/click on another form, it resets focus to the focus locked form. Thanks!
 
Make a top level form?
Always On top?


Ez Logic
Michigan
 
Is modal not sufficient? Are you trying to do this across all applications, or just within your application?

Tamar
 
I agree with Tamar. If you need this for your own application you just need to set the form modal, which is done by setting WindowType to 1 at design time (this can't be decided at runtime after the form already started).

If you want this for whole windows, as she asks, then you may want your app to run as a kiosk app. That's not so easy, as even if you set your main top level form maximised and remove all control box buttons (close, shrink) users can still change to the desktop with ALT+TAB or Windows+M or the Task bar or run task manager with CTRL+ALT+DEL and perhaps even more options I don't think of right now. You would need a specific kiosk shell, eg see
Bye, Olaf.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top