Program needs to have focus full time
-
I have a program that needs to have focus all the time but have no idea where to start. The program is set to form on top but I do not want it to lose focus. Please help!!:confused:
First, your Application never really has the focus. It's title bar changes color because one of it's child controls has the focus. A form is nothing but a control, but a control that can contain other controls. Individual controls get and lose focus. Its a pain to manage if your trying to retain the input focus to just your app (form). You have to keep track of which control actually has the focus and if none of your child controls has the focus anymore, which control do you give it back to? A better way would be to redo the form(s) your using and show them as system modal dialog boxes. This way, Windows manages the focus for you and you can't leave the app until the dialog box goes away. Search the documentation for ShowDialog to see what I mean. Your app needs to have the focus all the time? Why? It kind of make using the rest of the system a pain to use if you can't so much as click on the "Start" button... RageInTheMachine9532