How to display a message box in C # as a system modal?

How to display a message box in C # as a system modal, something like vbModalin Visual Basic 6?

+3
source share
5 answers

Are you talking about message boxes or standard forms? If you're talking about standard forms, the simplest .NET equivalent of vbModal is ShowDialog System.Windows.Forms.Form . So, instead of the old

myForm.Show vbModal

you are using

myForm.ShowDialog();

or

myForm.ShowDialog(myFormOwner);

This stops execution on the line ShowDialogjust like the old vbModalone used for.

+2
source
+1

, , .NET .

0
-1

All Articles