Sam,
See inline.
The Application.Run method is to use to start the application message
loop.
You cannot give form1().ShowDialog there.
Yes I can. It runs without any problem (No Application.Run Method call is
needed in that case). But I want to make sure that it does not involve any
touble.
You can, but it's not the right way to do it. You should call
Application.Run to make sure the message loop is primed properly.
I guess what you are trying to do is to show the form as a dialog.
What I am trying to do is just to understand what Application.Run does. I
know it manages the message pump. If (new Form1()).ShowDialog() runs ok
without Application.Run, then what manages message pump?
When you show the form as a dialog, another pump internal to the dialog
handles the windows messages (same thing with messagebox, menus, etc, etc).
That's the pump that is being run. If another message that the dialog can't
handle comes in on that pump (and it might, since anything can come in
really), then it won't know what to do.
Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)