Solved

Close button in MessageBox

Posted on 2012-03-15
3
490 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 40

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 70

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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Article by: Ivo
C# And Nullable Types Since 2.0 C# has Nullable(T) Generic Structure. The idea behind is to allow value type objects to have null values just like reference types have. This concerns scenarios where not all data sources have values (like a databa…
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

695 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