How to display a message box in C# as system modal, something like vbModal
in Visual Basic 6?
Are you talking about message boxes, or standard forms? If you're talking about standard forms, the easiest .NET equivalent of vbModal is the ShowDialog method of System.Windows.Forms.Form
. So, rather than the old
myForm.Show vbModal
you use
myForm.ShowDialog();
or
myForm.ShowDialog(myFormOwner);
This halts execution at the ShowDialog
line just like the old vbModal
used to.