Modeless vs Modal Dialog

Simple explanation of the differences between modeless and modal dialogs.

win1 dialog

Show() – Modeless

  • Doesn’t stop executing.
  • Can show and create several windows and interact all at once.

ShowDialog() – Modal

  • Intercepts code execution.
  • Stops interaction with other windows.
  • Ideal for presenting the user with a choice that must be made before continuing.
  • When a form is closed the form object and all it’s control information still exists until the referencing variable goes out of scope:

Form1 myForm = new Form1();
myForm .ShowDialog();
....lots of code here.....


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s