O'Reilly logo

A Programmer's Guide to .NET by Alexei Fedorov

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

8.5. Message boxes

To display a predefined dialog box, we use the static MessageBox class. This class has only one method – the Show method. It is used to display a message box and its properties are used to determine the title, message, buttons, and icons shown in it. Table 8.3 shows different overloaded versions of the Show method and explains when to use each of them.

Table 8.3. What the various parameters of Show are used for
Parameters Used to
String Display a message box with the specified text.
String, String Display a message box with the specified text and caption.
String, String, MessageBoxButtons Display a message box with the specified text, caption, and buttons
String, String, MessageBoxButtons, MessageBoxIcon Display a message ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required