Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to show Error & Warning Message Box in .NET/ How to Customize MessageBox

Tags:

c#

.net

winforms

Using C# .NET (Winforms).

I want to know how can I show the message boxes with a Ding!! sound & a red colored cross mark in it. This is what I'm talking about:

screenshot

How to do such things for my software, with custom errors and custom warnings?

MessageBox.Show("asdf"); 

doesn't give me customize.

like image 773
claws Avatar asked Jan 21 '10 13:01

claws


People also ask

How do I show PHP errors?

Quickly Show All PHP Errors The quickest way to display all php errors and warnings is to add these lines to your PHP code file: ini_set('display_errors', 1); ini_set('display_startup_errors', 1); error_reporting(E_ALL);

How can I see errors in xampp?

To display all errors, including parsing errors, in xampp, make the following changes to the php. ini example file and restart the apache server. In the PHP. ini file, set the display errors directive to turn on.

What is PHP report error?

The error_reporting() function specifies which errors are reported. PHP has many levels of errors, and using this function sets that level for the current script.


1 Answers

Try this:

MessageBox.Show("Some text", "Some title",      MessageBoxButtons.OK, MessageBoxIcon.Error); 
like image 52
Andrew Hare Avatar answered Oct 11 '22 10:10

Andrew Hare