Author Message

Hi, there,

After I create a form instance: form1 = new System.Windows.Forms.Form(); I
can use form1.Show() to show the form on the screen, but this form won't
receive any events, no reactions to the mouse click.
Is there a way to let the form receive events while using Show() to bring
the form into the front end?



Wed, 12 Jan 2005 08:16:13 GMT
Sounds like you do not have the application object running. The
Application.Run must be called passing a main form to it. Or you must
create an ApplicationContext and pass that and set the main form of the
ApplicationContext at some other time. With out the Application.Run
being called there is no MessageLoop and the events will not fire
because no messages are being processed.


Jason Sacks

*** Sent via Developersdex ***
Don't just participate in USENET...get rewarded for it!

Wed, 12 Jan 2005 07:44:47 GMT  
 [ 2 post ] 

 Relevant Pages 

1. override System.Windows.Forms.Treenode.Text

2. Directory Selection in System.Windows.Forms.OpenFileDialog

3. Few questions reguarding System::Windows::Forms::Control...(

4. System.Windows.Forms.Application in Class lib

5. System.Windows.Forms.Application.UserAppDataPath

6. Subclass System.Windows.Forms.TabControl

7. How to disable adding, inserting ord deleting Rows in the DataGrid (System.Windows.Forms.DataGrid)

8. System.Windows.Forms.Form

9. Displaying XML in a System.Windows.Forms.Form control

10. Extending System.Windows.Forms.Form?

11. Broken Show() and Hide() for Forms.Form.TabPage

12. modeless form using form.Show() method in C#


Powered by phpBB® Forum Software