Modal Dialogs in .NET [Windows Forms]

Skip Navigation LinksIrocon > Blog > 2005 > November, 2005 > November 05, 2005 > Modal Dialogs in .NET [Windows Forms]

Modal Dialogs in .NET [Windows Forms]

The article Building Windows Applications in VB.NET on InformtIT.com explains extensively how to work with modal dialogs in windows forms.

1) You can create a Form variable in the dialog that you use to reference back to the calling form and you set it before showing the dialog, for example: frmDialog.Caller = Me
2) You can use properties in the dialog to set its variables before showing, then set one button as 'AccceptButton' and another as 'CancelButton'. In your calling code, just check for 'DialogResult'.

Last Updated:Thursday, September 02, 2010By:alferoSource#

Would you like to comment?

Sign in with your OpenID. If you do not know what OpenID is, find out.