I have a MainForm Class Instance,
I bring up another form like so;
InputForm MyInput= new InputForm("Enter a Number");
MyInput.ShowDialog();
I close MyInput form from within itself like this;
private void Button_Click(object sender, EventArgs e)
{
//Do things here
this.Hide();
}
Flow resumes in the MainForm and using either
this.Show();
or
this.Activate();
neither will consistantly bring the MainForm to the front.
How can I do this?
What you need to do is show your InputForm like this. This form of ShowDialog assigns the owner to your dialogbox.