Solved

Close button in MessageBox

Posted on 2012-03-15
3
480 Views
Last Modified: 2012-03-20
How do I get a "Close" button in MessageBox?
In this;
            MessageBox.Show("My text", "My C# Experiment", MessageBoxButtons.OK);
The button is "OK", but I would like "Close:
0
Comment
Question by:allelopath
3 Comments
 
LVL 39

Accepted Solution

by:
Kyle Abrahams earned 167 total points
ID: 37725137
You can't just override.  What you can do is create your own form which similiarly does the same thing and then call as ShowDialog.

http://social.msdn.microsoft.com/Forums/en/csharpgeneral/thread/1086b27f-683c-457a-b00e-b80b48d69ef5
0
 
LVL 69

Assisted Solution

by:Éric Moreau
Éric Moreau earned 167 total points
ID: 37725167
a long time ago, I wrote an article on building a custom messagebox: http://www.emoreau.com/Entries/Articles/2006/01/A-custom-MessageBox.aspx
0
 
LVL 14

Assisted Solution

by:systan
systan earned 166 total points
ID: 37725393
0

Featured Post

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

This article introduced a TextBox that supports transparent background.   Introduction TextBox is the most widely used control component in GUI design. Most GUI controls do not support transparent background and more or less do not have the…
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

758 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now