A message box is a prefabricated modal dialog box that displays a text message to a user.
Questions tagged [messagebox]
1743 questions
16
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#?
![](../../users/profiles/655960.webp)
Brezhnews
- 295
- 2
- 5
- 12
16
votes
1 answer
Python MessageBox with Icons using ctypes and windll
So, I'm looking for a way to create a simple Messagebox in Python using just the native libraries and came across several posts, but namely this one, leveraging ctypes to import the win32.dll and call its MessageboxA function.
import ctypes # An…
![](../../users/profiles/2296540.webp)
MrBubbles
- 405
- 2
- 6
- 19
15
votes
2 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…
![](../../users/profiles/1350217.webp)
Hazem Labeeb
- 245
- 1
- 3
- 11
15
votes
5 answers
How to create the confirm box in mvc controller?
I need to create the confirm box in mvc controller?. Using this 'yes' or 'no' value I need to perform the action in my controller. How we do that?
Sample code:
public ActionResult ActionName(passing value)
{
// some code
…
![](../../users/profiles/2189346.webp)
user279stack1
- 153
- 1
- 2
- 8
14
votes
1 answer
WPF MessageBox Default To Cancel
With this the default is OK. Can I make the default Cancel?
MessageBoxResult result = MessageBox.Show
(message, caption, MessageBoxButton.OKCancel);
![](../../users/profiles/607314.webp)
paparazzo
- 42,665
- 20
- 93
- 158
14
votes
5 answers
How do I change the MessageBox location?
I need to change the message box location. I don't want it to be in the center of the page.
MessageBox.Show("Hello");
![](../../users/profiles/657449.webp)
guy
- 141
- 1
- 1
- 3
14
votes
4 answers
Windows [cmd.exe] command to display a messagebox with timeout?
Note: This is a question-with-answer in order to document a technique that others might find useful, and in order to perhaps become aware of others’ even better solutions. Do feel free to add critique or questions as comments. Also do feel free to…
![](../../users/profiles/464581.webp)
Cheers and hth. - Alf
- 135,616
- 15
- 192
- 304
13
votes
5 answers
How to get text and a variable in a messagebox
I just need to know how to have plain text and a variable in a messagebox.
For example:
I can do this: MsgBox(variable)
And I can do this: MsgBox("Variable = ")
But I can't do this: MsgBox("Variable = " + variable)
![](../../users/profiles/952248.webp)
Mark Kramer
- 2,978
- 7
- 30
- 50
13
votes
4 answers
How to create a custom MessageBox?
I'm trying to make a custom message box with my controls.
public static partial class Msg : Form
{
public static void show(string content, string description)
{
}
}
Actually I need to place some controls (a gridview) in this form and I…
![](../../users/profiles/399414.webp)
Sen Jacob
- 3,025
- 3
- 31
- 52
12
votes
7 answers
how to set wpf MessageBox.Owner to desktop window because SplashScreen closes MessageBox
I am using the SplashScreen feature in WPF by setting a bitmap's Build Action to Splashscreen. Behind the splash screen, licensing information is being check, and if it fails I show a MessageBox.
According to this Feedback, it is because the…
![](../../users/profiles/12230.webp)
adriaanp
- 2,054
- 2
- 22
- 40
12
votes
3 answers
Qt: How to display a Messagebox when you are within a function?
I'm developing using the Qt Nokia SDK.
I'm having trouble displaying the buttons of a MessageBox, when trying to display a messagebox within a function. If i try to display it within the main window, there is no problem showing the buttons.
The…
![](../../users/profiles/24872.webp)
Ikky
- 2,656
- 12
- 44
- 65
12
votes
3 answers
Automatically close messagebox in C#
I am currently developing an application in C# where I display a MessageBox. How can I automatically close the message box after a couple of seconds?
![](../../users/profiles/499448.webp)
Boardy
- 31,944
- 94
- 238
- 411
12
votes
5 answers
Popping a MessageBox for the main app with Backgroundworker in WPF
In a WPF app, I am using a BackgroundWorker to periodically check for a condition on the server. While that works fine, I want to pop a MessageBox notifing the users if something fails during the check.
Here's what I have:
public static void…
![](../../users/profiles/305469.webp)
Chi Chan
- 9,863
- 8
- 30
- 51
12
votes
5 answers
What is the difference between Invoking and BeginInvoking a MessageBox?
In a form, compare
BeginInvoke (new Action (() => {
MessageBox.Show ());
}));
with
Invoke (new Action (() => {
MessageBox.Show ());
}));
What is the difference, and when should I use one over the other? How is the behavior affected by the…
![](../../users/profiles/39590.webp)
mafu
- 28,708
- 38
- 138
- 232
12
votes
1 answer
How to show a hyperlink in Inno Setup?
I'm making a validation in my Inno Setup installer to check whether or not a Microsoft update is installed on the machine, if not, I'm showing a simple message box telling the user that the update is required, this is the message code:
MsgBox(
…
![](../../users/profiles/58434.webp)
Vic
- 2,648
- 4
- 34
- 53