Pass control-focus to control from a manager class 
Author Message
 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.




Wed, 03 Nov 2004 17:31:52 GMT  
 Pass control-focus to control from a manager class
Use ShowDialog() method or it would be better that your entry point is in
Windows Application project type.

-nolasco


Quote:
> 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.





Wed, 03 Nov 2004 17:53:39 GMT  
 Pass control-focus to control from a manager class
Thanks for the help.

How would I approach the use of a Windows Application Project Type as the
entry point?

Thanks,
Mike


Quote:
> Use ShowDialog() method or it would be better that your entry point is in
> Windows Application project type.

> -nolasco



> > 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.





Thu, 04 Nov 2004 00:49:06 GMT  
 Pass control-focus to control from a manager class
Never mind.  I figured it out.  Thanks again for the help.

--Mike


Quote:
> Thanks for the help.

> How would I approach the use of a Windows Application Project Type as the
> entry point?

> Thanks,
> Mike



> > Use ShowDialog() method or it would be better that your entry point is
in
> > Windows Application project type.

> > -nolasco



> > > 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.





Thu, 04 Nov 2004 01:30:49 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. C# Focus Issues - Touch Screen - User Controls - Button Control - TextBox

2. Need to control when a control gets the focus on a dialog

3. CListCtrl: The List Control de-highlights when the control loses focus

4. Control wizard generating wrapper classes for ActiveX controls...

5. putting classes/controls in my activex control

6. Non-control class containing controls

7. Service Control Manager Specification

8. service control manager

9. The NT Service Control Manager On A Remote Machine

10. Service Control Manager and System Environment

11. Service Control Manager vs. Command Line

12. service control manager and Windows XP

 

 
Powered by phpBB® Forum Software