C# - Messagebox asking for permission to continue [duplicate] - c#

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

Related

wpf how to view desktop or go desktop by using user32 [duplicate]

This question already has answers here:
Programmatically show the desktop
(2 answers)
Simulating Key Press C#
(8 answers)
Closed 11 months ago.
hi i want to create application when i click the button it go to desktop, i mean when you press Win + D it go to desktop directly, i want to use user32 to be more practical, I want to use this method in the future too, but how?
i dont want to use this way, this road is a little weak :
II.Keyboard.KeyDown(VirtualKeyCode.LWIN);
II.Keyboard.KeyPress(VirtualKeyCode.VK_D);
II.Keyboard.KeyUp(VirtualKeyCode.LWIN);
thank you for answer

Is it possible to create custom MessageBox Icons? [duplicate]

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

Check for empty fields in form [duplicate]

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.

Programmatically execute Ctrl-H [duplicate]

This question already has answers here:
Closed 10 years ago.
Possible Duplicate:
C# Simulate Key Press
I need a way in C# to "type" Ctrl+H in code when a user clicks a button. I am working on a Word addin that customizes the ribbon. When a user clicks my "Replace" button, I want the Replace dialog to show. I can't figure out how to get to that dialog box, but Ctrl+H brings it up. Is there a way to do that?
Take a look here at handling different key combinations. Are you using VSTO?
EDIT: Just reread and understand you're looking at typing those keys! I'll adjust accordingly!
EDIT: The question here covers simulating key presses.

.NET. How to hack OpenFileDialog? [duplicate]

This question already has an answer here:
Closed 12 years ago.
Possible Duplicate:
changing button text in OpenFileDialog in C#.net
Have a good day,
Is there a way to override Open button in .NET OpenFileDialog?
I need to Change the button text and override OnClick event.
If this is not possible can I put a custom button over the Open button (but at the most top X order)?
--
BR
Murat
Everything is possible, but the question is what You really want to achieve by this strange behavior ?
What's wrong with standard usage of the OK button ? Where You pick the path and do what You want to.

Categories