Creating Custom Dialog Boxes
Most of the time, the MessageBox.Show() method should be a sufficient means to display messages to a user. At times, however, the MessageBox.Show() method is too limited for a given purpose. For example, suppose that you wanted to display a lot of text to a user (such as a log file of some sort) and therefore wanted a message box that is sizable by the user.
Custom dialog boxes are nothing more than standard modal forms with one notable exception: One or more buttons are designated to return a dialog result, just as the buttons on a message box shown with the MessageBox.Show() method return a dialog result.
You're now going to create a custom dialog box. Create a new Windows Application titled Custom Dialog Example ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access