Solved

Simple Yes No box

Posted on 2004-10-08
1
183 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:Tom Knowlton
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

[Webinar] Code, Load, and Grow

Managing multiple websites, servers, applications, and security on a daily basis? Join us for a webinar on May 25th to learn how to simplify administration and management of virtual hosts for IT admins, create a secure environment, and deploy code more effectively and frequently.

Question has a verified solution.

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

Article by: Najam
Having new technologies does not mean they will completely replace old components.  Recently I had to create WCF that will be called by VB6 component.  Here I will describe what steps one should follow while doing so, please feel free to post any qu…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial

739 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