Yes/No dialog box

  • Thread starter Thread starter Mark
  • Start date Start date
M

Mark

I'm new to C# but know MFC C++. I'm looking for api for launching a yes/no
dialog box which returns a value that can be used for farther processing.

Regards
Mark
 
I'm new to C# but know MFC C++. I'm looking for api for launching a yes/no
dialog box which returns a value that can be used for farther processing.

Regards
Mark

MessageBox object is what you're looking for. For more dialog boxes
such as Open/Save Dialogs, look at your toolbox in VS IDE.

A sample for determining MessageBox result:

if (MessageBox.Show("are you sure?","Sure?",MessageBoxButtons.YesNo)
== DialogResult.Yes)
{
MessageBox.Show("Ok clicked");
}
else
{
MessageBox.Show("No clicked");
}


Hope this helps,

Onur Güzel
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top