A message box is a prefabricated modal dialog box that displays a text message to a user.
Questions tagged [messagebox]
1861 questions
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…

mafu
- 31,798
- 42
- 154
- 247
12
votes
2 answers
WPF MessageBox with MVVM pattern?
Say I want to display some validation error to the user. In the MVVM pattern, I could have a label that is bound to some property on my viewmodel. But what if I wanted to show a message box while strictly adhering to the MVVM pattern. What would my…

ConditionRacer
- 4,418
- 6
- 45
- 67
12
votes
1 answer
Getting the text from a dialog box that does not use a label control?
This is a continuation of my previous question How to supress a dialog box an Inproc COM Server displays.
Background:
A recap of my situation: I have a Inproc COM Server written in Delphi from a 3rd party. One of the functions I call will display a…

Scott Chamberlain
- 124,994
- 33
- 282
- 431
12
votes
5 answers
How to create a message box with tkinter?
I've been trying to build a fairly simple message box in tkinter that has "YES" and "NO" buttons. When I push the "YES" button internally it must go and write YES to a file. Similarly, when "NO" is pushed, NO must be written to a file. How can I do…

user46646
- 153,461
- 44
- 78
- 84
11
votes
4 answers
Messagebox and Unit testing
I'm trying to find the best way to uncouple messageboxes from my logic so I can properly unittest it. Now I was wondering if it would be enough if I just made a seperate helper class (C#) which I can stub later for my messagebox. For…

Enthusiastic Programmer
- 187
- 1
- 2
- 10
11
votes
5 answers
C# formatting a MessageBox
I want to display a MessageBox alerting the user that the process is complete, and giving a breakdown on how long each stage of the process took. I've got the text that I want to display formatted appropriately, but the default font of the…

T.K.
- 2,229
- 5
- 22
- 26
11
votes
5 answers
C# MessageBox To Front When App is Minimized To Tray
I have some code that popups a message box:
MessageBox.Show(this,
"You have not inputted a username or password. Would you like to configure your settings now?",
"Settings Needed",
…

Luke Belbina
- 5,708
- 12
- 52
- 75
11
votes
4 answers
PyQt4: How to pause a Thread until a signal is emitted?
I have the following pyqtmain.py:
#!/usr/bin/python3
import sys
from PyQt4.QtCore import *
from PyQt4.QtGui import *
from pyqtMeasThread import *
class MainWindow(QMainWindow):
def __init__(self, parent=None):
self.qt_app =…

2342G456DI8
- 1,819
- 3
- 16
- 29
11
votes
1 answer
Putting a hyperlink in a MessageBox
Is it possible to add a hyperlink to a messagebox? I'm trying to do something like this:
MsgBox "Sorry, but you have an out-of-date database version. Please redownload via the batch file to ensure that you have the latest version. Contact the…

Johnny Bones
- 8,786
- 7
- 52
- 117
11
votes
4 answers
C# Winforms Message Box Properties
in C# winforms when we display a message box it has no title in the title bar and no title in its button that is in the task bar.
What if i want to set title and icon for a message box.
one option is that create a form that appears and behaves like…

Moon
- 19,518
- 56
- 138
- 200
10
votes
5 answers
Display a message box with a timeout value
The question comes from code like this.
Set scriptshell = CreateObject("wscript.shell")
Const TIMEOUT_IN_SECS = 60
Select Case scriptshell.popup("Yes or No? leaving this window for 1 min is the same as clicking Yes.", TIMEOUT_IN_SECS, "popup…

Anonymous Type
- 3,051
- 2
- 27
- 45
10
votes
3 answers
pyqt5 - closing/terminating application
I'm working though the pyqt5 tutorial found here Zetcode, PyQt5
As an exercise for myself I'm trying to expand on an example so that I am presented with the same dialog message box regardless of method used to close the app:
clicking the 'X' button…

user3548783
- 175
- 2
- 2
- 9
10
votes
2 answers
WPF MessageBox not waiting for result [WPF NotifyIcon]
I am using WPF NotifyIcon to create a System Tray service. When I show a messagebox, it shows up for half a second and then disappears immediately without waiting for input.
This kind of situation has happened before, and the usual advice is to use…

Gigi
- 28,163
- 29
- 106
- 188
10
votes
3 answers
Change words on tkinter Messagebox buttons
I'm using tkinter's "askokcancel" message box to warn the user, with a pop-up, of an irreversible action.
from tkinter import Tk
Tk().withdraw()
from tkinter.messagebox import askokcancel
askokcancel("Warning", "This will delete stuff")
I'd like to…

Emilio M Bumachar
- 2,532
- 3
- 26
- 30
10
votes
3 answers
VBA code to show Message Box popup if the formula in the target cell exceeds a certain value
I am trying to write a simple macro to display a pop-up (vbOKOnly) if the value in a cell exceeds a certain value.
I basically have a worksheet with products and discounts. I have a formula in one cell, say A1, that shows the discount as a percent…

Hatt
- 689
- 4
- 9
- 23