A message box is a prefabricated modal dialog box that displays a text message to a user.
Questions tagged [messagebox]
1743 questions
21
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++.
![](../../users/profiles/30415.webp)
subrama6
- 507
- 1
- 5
- 19
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…
![](../../users/profiles/429764.webp)
Tom Davies
- 2,154
- 3
- 23
- 38
20
votes
11 answers
Force to close MessageBox programmatically
Let me give you the background.
We have an Application(medium sized) that is using MessageBox.Show (....) at various places (in hundreds).
These message boxes are part of workflow and being used for informing,warning or taking input from an user.…
![](../../users/profiles/1017855.webp)
NYK
- 221
- 1
- 2
- 3
20
votes
6 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…
![](../../users/profiles/245268.webp)
Jonn
- 4,404
- 7
- 43
- 65
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…
![](../../users/profiles/776226.webp)
Sagotharan
- 2,508
- 16
- 67
- 116
19
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.
![](../../users/profiles/434910.webp)
Vyasdev Meledath
- 8,280
- 19
- 44
- 66
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!
![](../../users/profiles/281671.webp)
sooprise
- 20,955
- 62
- 180
- 265
18
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?
![](../../users/profiles/235181.webp)
Jasmine Appelblad
- 1,484
- 2
- 21
- 37
18
votes
7 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.
![](../../users/profiles/656691.webp)
Patrick Villela
- 738
- 4
- 13
- 36
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…
![](../../users/profiles/418343.webp)
Anyname Donotcare
- 10,000
- 54
- 200
- 355
18
votes
8 answers
jquery: Flash messages
With jQuery, how can I display a flash message at the top of the page in an easy way? Is there something built-in, or a plugin, or is it easy enough to do it yourself?
What I mean is like after a successful ajax post I would like to just say "hey,…
![](../../users/profiles/39321.webp)
Svish
- 138,188
- 158
- 423
- 589
18
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),
…
![](../../users/profiles/1484047.webp)
Frame91
- 3,317
- 5
- 36
- 88
17
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…
![](../../users/profiles/263158.webp)
Ashley Grenon
- 8,520
- 4
- 39
- 53
17
votes
2 answers
How to show a MessageBox with a checkbox?
I would like to create a MessageBox that has Yes/No buttons AND a checkbox.
The application is a picture resizer and it will be re-sizing a number of pictures at once; in the process it will check if the new location filename exists with the option…
![](../../users/profiles/2468607.webp)
TK421
- 480
- 5
- 9
- 18
16
votes
9 answers
Should I use a warning icon or a question mark icon in a Windows message box?
Many know of the MessageBoxIcon of type "question". If you are not particularly familiar with this icon, it is just a glorified question mark. I am curious as to whether or not this icon is acceptable in professional applications. For example,…
user725913