C# LanguageCreating Own MessageBox in Windows Form Application


Introduction

First we need to know what a MessageBox is...

The MessageBox control displays a message with specified text, and can be customised by specifying a custom image, title and button sets (These button sets allow the user to choose more than a basic yes/no answer).

By creating our own MessageBox we can re-use that MessageBox Control in any new applications just by using the generated dll, or copying the file containing the class.

Syntax

  • 'static DialogResult result = DialogResult.No; //DialogResult is returned by dialogs after dismissal.'