messagebox

WPF MessageBox Default To Cancel

倾然丶 夕夏残阳落幕 提交于 2019-11-30 18:15:56
With this the default is OK. Can I make the default Cancel? MessageBoxResult result = MessageBox.Show (message, caption, MessageBoxButton.OKCancel); Use this overload , which allows you to specify the default MessageBoxResult : MessageBoxResult result = MessageBox.Show (message, caption, MessageBoxButton.OKCancel, MessageBoxImage.Information, MessageBoxResult.Cancel); 来源: https://stackoverflow.com/questions/7179900/wpf-messagebox-default-to-cancel

How to show a hyperlink in Inno Setup?

柔情痞子 提交于 2019-11-30 18:05:20
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( 'Your system requires an update supplied by Microsoft. ' + 'Please follow this link to install it: ' + 'http://www.microsoft.com/downloads/details.aspx?FamilyID=1B0BFB35-C252-43CC-8A2A-6A64D6AC4670&displaylang=en', mbInformation, MB_OK); I want to make the URL an hyperlink to the web page, but I haven't been able to figure it out how, it is possible in

Popping a MessageBox for the main app with Backgroundworker in WPF

假装没事ソ 提交于 2019-11-30 13:06:17
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 StartWorker() { worker = new BackgroundWorker(); worker.DoWork += DoSomeWork; worker.RunWorkerAsync(); } private static void DoSomeWork(object sender, DoWorkEventArgs e) { while (!worker.CancellationPending) { Thread.Sleep(5000); var isOkay = CheckCondition(); if(!isOkay) MessageBox.Show("I should block the main window"); } } But this MessageBox does not

How to show a MessageBox with a checkbox?

本秂侑毒 提交于 2019-11-30 11:49:02
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 to overwrite it. The MessageBox will give the user the option to overwrite any new files if desired, while the checkbox will prevent having to click Yes x number of times if they want to overwrite every file. How do I add a checkbox to a MessageBox dialog? You can't add a checkbox to a MessageBox. As Tim and rsbarro suggest, you should create a

Show message Box in .net console application

核能气质少年 提交于 2019-11-30 11:14:00
How to show a message box in a .net c# or vb console application ? Something like: Console.WriteLine("Hello World"); MessageBox.Show("Hello World"); or Console.WriteLine("Hello") MsgBox("Hello") in c# and vb respectively. Is it possible? Syed Osama Maruf We can show a message box in a console application. But first include this reference in your vb.net or c# console application System.Windows.Forms; Reference: To add reference in vb.net program right click (in solution explorer) on your project name-> then add reference-> then .Net-> then select System.Windows.Forms. To add reference in c#

How to show a message box for a specified time?

会有一股神秘感。 提交于 2019-11-30 09:52:08
Is there a way to show a message box for a specified time (that means, the message box will close itself when the specified time elapses) ? TLama Windows API has a function for showing a message box for a specified time, but for some reason is that function undocumented, which means it is not officially supported and may well be subject to change. That function is called MessageBoxTimeout , and it has even export in the user32.dll library, what makes me feel that the only thing this function lacks is the official documentation. But who knows... The following script shows how to display a

(C++) MessageBox for Linux like in MS Windows

帅比萌擦擦* 提交于 2019-11-30 09:29:10
I need to implement a simple graphical message box for a Linux (SDL) application similar to the Windows MessageBox in C++ (gcc/g++ 4.4.0). All it needs to do is to display a caption, a message and an ok or close button and to return to the calling function when that button is clicked. SDL just uses X(11) to open a window for (OpenGL) rendering. I have looked through a similar thread regarding a GTK implementation, but that implementation doesn't seem to work properly. I have also tried wxWidgets' wxMessageBox function, but compiling the headers makes the compiler throw error messages about

MessageBox.Show— font change?

我与影子孤独终老i 提交于 2019-11-30 07:50:12
问题 I'm using the MessageBox class to show errors to users, and while that might not be the right behavior, it's very convenient. This is a touchscreen application, however, so I need the 'ok' button to be much larger than it is (curse my inordinately large fingers!). I think that if I increase the font size in the dialog box, I should be ok. Is there a way to do that? Or really, is there any way to increase the dialog size? Thanks 回答1: As far as I'm aware you can't, as the 'normal' dialog boxes

Force MessageBox to be on top of application window in .net/WPF

☆樱花仙子☆ 提交于 2019-11-30 06:40:09
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 problem I have is that when a MessageBox is displayed, users can then click on the main app window and bring it to the front, meaning the MessageBox becomes hidden from view. In this case the user might not realize it's there, or forget about it, and to them, the main app seems to have frozen. I've read a number of threads about this, but none have

Dialog MessageBox sometimes hidden behind the main form

╄→гoц情女王★ 提交于 2019-11-30 06:27:55
Some of our non-technical users are having problems where a dialog MessageBox in our application can sometimes be displayed behind the main form and the application does not accept any input until the messagebox (which they can't see) is dismissed. The application is written in C# and the message boxes are standard eg the code can be as simple as MessageBox.Show(message, caption) and the messageboxes can be created by the main UI thread (ie not some background thread). The Application does not have to be run full-screen, but 90% of our users do run it full-screen. Most of the time ((maybe > 99