A message box is a prefabricated modal dialog box that displays a text message to a user.
Questions tagged [messagebox]
1861 questions
24
votes
2 answers
How to create Hyperlink in MessageBox.show?
I have tried creating a hyperlink in MessageBox in this way:
MessageBox.Show(
"test message",
"caption",
MessageBoxButtons.YesNo,
MessageBoxIcon.Information,
MessageBoxDefaultButton.Button1,
0,
**"http://google.com"**,
…
user2046417
23
votes
7 answers
How to translate the buttons in qmessagebox?
I have a QMessageBox like this:
QMessageBox::question(this, tr("Sure want to quit?"),
tr("Sure to quit?"), QMessageBox::Yes | QMessageBox::No);
How could I translate the Yes/No word? since there is no place to place a tr()?

Nicholas Yu
- 333
- 1
- 5
- 7
22
votes
8 answers
How to get DataGridView cell value in messagebox?
How can I get DataGridView cell value to be written in the MessageBox in C#?

Brezhnews
- 365
- 2
- 6
- 13
22
votes
3 answers
How to customize message box
I am doing C# application, and I want to change the style of a message box. Is it possible or not?
Example: change button style, fore color, etc.

Vyasdev Meledath
- 8,926
- 20
- 48
- 68
22
votes
8 answers
Custom button captions in .NET messagebox?
Is there an easy way to display a messagebox in VB.NET with custom button captions? I came across What is an easy way to create a MessageBox with custom button text in Managed C++?, in the Stack Overflow archives, but it's for Managed C++.

subrama6
- 517
- 1
- 5
- 20
22
votes
4 answers
New line is not working in MessageBox in C#/WPF
Short question: I have a string in my resources: "This is my test string {0}\n\nTest"
I'm trying to display this string in my Messagebox:
MessageBox.Show(String.Format(Properties.Resources.About,
Constants.VERSION),
…

Frame91
- 3,670
- 8
- 45
- 89
21
votes
3 answers
Force MessageBox to be on top of application window in .net/WPF
In my WPF app, I sometimes being up a System.Windows.MessageBox. When it is initially displayed, it is shown on top of my main application window, as I would like. Is there a way that I can force it to ALWAYS remain top of the main window? The…

Tom Davies
- 2,386
- 3
- 27
- 44
20
votes
4 answers
MessageBox.Show() Custom Icon?
I want to use a custom icon in MessageBox.Show("Message", "Title", MessageBoxButton.OK, MeesageBoxIcon.myIcon) Method.
Any suggestion please?

Jasmine Appelblad
- 1,554
- 3
- 22
- 37
19
votes
6 answers
How can I show a message box with details in WinForms?
Just now I noticed that Visual Studio shows a message box with details when a property is set to an invalid value. For example:
Is it possible to make this type of message box in WinForms?
I have tried the following code:
MessageBox.Show("Error in…

Sagotharan
- 2,586
- 16
- 73
- 117
19
votes
7 answers
System.Windows.MessageBox doesn't wait for user input before going poof!
...and it makes no sense why. T-T
In my Application_Startup event handler I have code that looks kinda like this:
private void Application_Startup(object sender, StartupEventArgs e)
{
string errorMessage;
if(CheckStartUpConditions(out…

Ashley Grenon
- 9,305
- 4
- 41
- 54
19
votes
8 answers
Using MsgBox without pausing the application
I need to display a message to the user. When I do this using MsgBox, the program stops until the user clicks the box away. I'd like to know if there's a way to open the MsgBox without pausing the program.

Patrícia Villela
- 808
- 4
- 14
- 38
19
votes
2 answers
Creating A MessageBox That Doesn't Stop Code?
Ok, I'm looking for something pretty simple: creating a MessageBox that doesn't stop my code.
I'm guessing I'll have to create a different thread or something? Please advise on the best way to accomplish this.
Thanks!

sooprise
- 22,657
- 67
- 188
- 276
19
votes
7 answers
Show a message box from a Windows Service
Can you display a message box (or any form of notification) from a windows service? Can't get it to work. I used:
global::System.Windows.Forms.MessageBox.Show("A fatal error occurred. " +
ServiceName + " is now…

Jonn
- 4,599
- 9
- 48
- 68
19
votes
3 answers
How to write superscript in a string and display using MessageBox.Show()?
I am trying to output the area using a message box, and it should be displayed as, for example, 256 unit^2...
How can I write a superscript (for powers) and a subscript (like O2 for oxygen)???
This guy here adds a superscript like (TM):
Adding a TM…

Hazem Labeeb
- 295
- 1
- 3
- 11
18
votes
5 answers
Produce "toast" messages like StackOverflow
One of the issues I think about every time I build my web application is how messages should appear to the end-users
I tried message boxes like those in windows applications, but they look so bad and make problems when published on the server. I've…

Anyname Donotcare
- 11,113
- 66
- 219
- 392