Solved

Simple Yes No box

Posted on 2004-10-08
1
175 Views
Last Modified: 2010-04-15
Does C# have available a simple Yes No Cancel dialog that I can bring up to ask a question and let the user decide?

Then when it closes I want to detect a Yes   No   or   Cancel    response.........and act accordingly.

Simple question but I would like it pretty fast....and hold the onions.
0
Comment
Question by:knowlton
1 Comment
 
LVL 5

Accepted Solution

by:
Tertioptus earned 500 total points
ID: 12261621
Try the follow, and make sure you are using the System.Windows.Forms namespace:


if(MessageBox.Show("Click Ok or Cancel", "My yes or no box",MessageBoxButtons.OKCancel, MessageBoxIcon.Information) == DialogResult.OK)
{
      //Do it
}

0

Featured Post

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Bit flags and bit flag manipulation is perhaps one of the most underrated strategies in programming, likely because most programmers developing in high-level languages rely too much on the high-level features, and forget about the low-level ones. Th…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now