This question already has answers here:
MessageBox.Show() Custom Icon?
(4 answers)
Closed 6 years ago.
Is there anyway to create a custom MessageBoxIcon, like MessageBoxIcon.Warning or something, only of my own image?
The Windows message box is a sufficient means to display messages to the user.
Try this link,
http://www.codeproject.com/Articles/17253/A-Custom-Message-Box
Related
This question already has answers here:
How do I create a message box with "Yes", "No" choices and a DialogResult?
(11 answers)
Closed 5 years ago.
can anyone suggest me a code for asking to click on yes or no to further persue or not in c#. I'm making a data base program and I want that a message box should sjow me the values to check and ask to click yes to continue or no to go back and modify
Probably you need to use MessageBox.Show. https://msdn.microsoft.com/en-us/library/system.windows.forms.messagebox.show(v=vs.110).aspx
This question already has answers here:
WPF version of Application.OpenForms
(3 answers)
Closed 8 years ago.
I have a small wpf/c# application and want to get a list of all of the open views. However, the Application.OpenForms, does not have "OpenForms" in the intellisense (and gives me an error). Could I be missing a specific reference of something?
I have tried: System.Windows.Application.OpenForms;
Based on the docs for the Application class, there is no OpenForms member.
http://msdn.microsoft.com/en-us/library/system.windows.application(v=vs.110).aspx
Try Application.Windows
var openWindows = System.Windows.Application.Current.Windows;
This question already has answers here:
How can run functions of powercfg by C# code?
(3 answers)
Closed 9 years ago.
From my C# program I want to open the power options from the control panel in Windows.
However I can't seem to find out how to do that, I tried making a shortcut and see where it goes but it is referring to the control panel.
Does anyone have an idea how to do that or where the exe is located to launch?
Try the following:
System.Diagnostics.Process.Start("powercfg.cpl");
This question already has answers here:
Find all controls in WPF Window by type
(17 answers)
Checking for unfilled fields with PHP
(3 answers)
Closed 9 years ago.
Is it possible to check a form for any empty text boxes rather than having to put a check on each individual text box with an if? Any help would be much appreciated.
I'm not that familiar with WPF, but you might try to get a list of the child-elements in a form, and for each, check if they are of type Textbox. If so, perform your validation.
This question already has answers here:
Can you access standard Windows strings like 'Cancel'?
(4 answers)
Is there a repository for localized common text in WinForms?
(2 answers)
Closed 9 years ago.
I would like to add to the form an universal 'Cancel' button. By universal I mean that on a system with different than English locales it will display localized 'Cancel' string. How to achieve this?
You need to use the localization support provided by .NET and Visual Studio. See for example a walkthrough here: Localizing Windows Forms.