views:

71

answers:

2

I got great help in my first question n hopefully someone will tell me or refer me to an earlier question about this topic.

I want to link different forms like I click on a button on first one and it opens the second one.Basically Im going to make a Menu for cellphone fucntions like SMS,CALL etc so I want that If I click on call a new form opens asking for Number to call etc.Thanks

+3  A: 
var otherForm = new Form2();
otherForm.ShowDialog(); // To show a modal dialog, or...
otherForm.Show();  // To show it as a non-modal window
Mehrdad Afshari
+3  A: 
void SomeInitializationFunction() {
      button.Click += new System.EventHandler(buttonClick);
}

private void buttonClick(object sender, System.EventArgs e)
{
    using(GetNumberForm getNumberForm = new GetNumberForm())
    {
        if(DialogResult.OK == getNumberForm.ShowDialog())
        {
            string phoneNumber = getNumberForm.PhoneNumber;
            // do something with the user input.
        }
    }
}
Chris Doggett