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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top