Interesting .NET Framework Behaviour

  • Thread starter Thread starter pascal
  • Start date Start date
P

pascal

Hi,

If I remove from a C# program the line
Application.Run(new Form)
with the line
(new Form).ShowDialog()
the program runs without any changes.
Why is that?
The form shouldn't process any messages, but it does!
Where is the message loop?

Thanks,
Diablo
 
Diablo,

Dialogs end up going into a modal message loop to provide additional
processing. That is why it works. If you just called show, then it
probably wouldn't work.

Hope this helps.
 
Back
Top