Hi,
How to display Message box in C# as System Modal, something like vbModal in VB6
Thanks
Hi,
How to display Message box in C# as System Modal, something like vbModal in VB6
Thanks
I think you'll have to roll your own.
A quick search has turned up these two links:
Standard message box in C# is modal (cannot access rest of app until messagebox is dismissed).
http://msdn.microsoft.com/en-us/library/aa335423(VS.71).aspx
"A message box is a modal dialog, which means no input (keyboard or mouse click) can occur except to objects on the modal form. "
Edit: I am not sure about Vb6 and messagebox there. Does it use a different type of "modal"?
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 forms. 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
You should also be asking yourself if you really want to be creating a system modal message box, its considered bad UI design and that's why its not in .NET out the box.