C#.NET

  • Thread starter Thread starter sravan_reddy001
  • Start date Start date
S

sravan_reddy001

hi
i am creating a small interface using C#. and i had a small prob..

i want to display a message box with two buttons and proceed further
depending on the user chouse..

- Sravan Reddy
 
Hi,


Just create a new form with the two buttons you need, and depending of the
button presses set a return value and close the form.
The code may look like this:

void ShowOptions()
{
OptionsForm form = new OptionsForm();
form.ShowDialog();
if ( form.Selection == Option1)
... do
else
..do
}
 
Thank u but i don't know how to call a form from the other.. please
provide a small code to do that
 
Thank u but i don't know how to call a form from the other.. please
provide a small code to do that

He answered your question. Use the ShowDialog method.
 

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