How To Use MetroMessageBox

How To Use MetroMessageBox

Again this will be a very quick guide on how to properly use the MetroMessageBox. MetroMessageBox work just the same as the normal message box function from where you need to pass a several parameters like message, title, button and icon.

Displays a modal dialog box that contains a system icon, a set of buttons, and a brief application-specific message, such as status or error information. The message box returns an integer value that indicates which button the user clicked.
MSDN

The available buttons for MetroMessageBox are Ok, OKCancel, AbortRetryIgnore, RetryCancel, YesNo and YesNoCancel. The default color of MetroMessageBox is gray and it will change depending on the MessageBoxIcon that we will pass to it.

C#

MetroMessageBox.Show(this, "Your message here.","Title Here",MessageBoxButtons.OKCancel,MessageBoxIcon.Hand);

VB.Net

MetroMessageBox.Show(Me, "Your message here.","Title Here",MessageBoxButtons.OKCancel,MessageBoxIcon.Hand)

The following are the available MessageBoxIcon for MetroMessageBox and its corresponding colors:

MessageBoxIcon.Asterisk & MessageBoxIcon.Information

metro-messagebox-how-to-use-05

MessageBoxIcon.Hand, MessageBoxIcon.Error & MessageBoxIcon.Stop
metro-messagebox-how-to-use-04

MessageBoxIcon.Exclamation & MessageBoxIcon.Warning
metro-messagebox-how-to-use-03

MessageBoxIcon.Question
metro-messagebox-how-to-use-02

MessageBoxIcon.None
metro-messagebox-how-to-use-01

Liked it? Take a second to support denricdenise on Patreon!

You may also like...