Click here to Skip to main content
15,880,651 members
Articles / Programming Languages / C#

Dissecting the MessageBox

Rate me:
Please Sign up or sign in to vote.
4.85/5 (96 votes)
26 Apr 2005CPOL13 min read 664K   7.7K   230  
A look at what goes into creating a message box, and in the process, create a customizable message box that supports custom buttons, icons, fonts ,"Don't ask me again" functionality, timeouts, localization and lots more.
using System;

namespace Utils.MessageBoxExLib
{
	/// <summary>
	/// Standard MessageBoxEx results
	/// </summary>
	public struct MessageBoxExResult
	{
		public const string Ok = "Ok";
		public const string Cancel = "Cancel";
		public const string Yes = "Yes";
		public const string No = "No";
		public const string Abort = "Abort";
		public const string Retry = "Retry";
		public const string Ignore = "Ignore";
        public const string Timeout = "Timeout";
	}
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Architect Rezolve Group Inc.
United States United States
I am a Software Architect living in the Greater Boston Area. Proud father of 2 boys. Taught myself to program and started writing software when I was 13, since then I have developed on several platforms over the past 20 years. Currently interested in machine learning, high performance web apps, mobile, security, network architecture, electronics and robotics.

I enjoy solving problems using technology, learning new things, reading and writing about technology. If I had the freedom to choose what to work on, my list would be as follows,

- Write a self aware AI system. I am fascinated by consciousness and how it emerges from simple mechanical rules.
- Build a Robot with human like motor skills and intelligence.
- Build a system to download your mind to an electronic medium, thus allowing “one” to exist outside their own body.
- Build a better model for the Universe. My personal belief is that all matter is connected and is able to share information at a level we’re not able to comprehend currently.
- Build ships capable of inter planetary travel.
Write software that gets used by millions of people.

Comments and Discussions