
Pass control-focus to control from a manager class
First off, I'm new to Windows programming and
C# so I apologize up front if
this is a beginner question.
Here's what I have:
My application's main() is in a management class (non-gui) that controls the
flow of initial screens. The business layer resides here excluded from the
interface layer.
The management class instaniates a windows form called user_login and calls
its show() method. Now here is the problem.
When the form's show() is called the window pops up and then disappears
(instead of waiting for input). How do I get the new window to maintain
focus? I thought the show() method was suppose to give the form control and
focus. As I stated, the entry-point class is a non-GUI class that contains
business logic. I want to be able to create and control the flow of windows
(interfaces) from classes like this but the GUIs aren't maintaining focus.
Any help would be greatly appreciated.