Solved

Simple Yes No box

Posted on 2004-10-08
1
177 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Extention Methods in C# 3.0 by Ivo Stoykov C# 3.0 offers extension methods. They allow extending existing classes without changing the class's source code or relying on inheritance. These are static methods invoked as instance method. This…
This article aims to explain the working of CircularLogArchiver. This tool was designed to solve the buildup of log file in cases where systems do not support circular logging or where circular logging is not enabled
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

914 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

12 Experts available now in Live!

Get 1:1 Help Now