G
Guest
I'm trying to close a form in C#. I have a vb background, so the question
may sound dumb. In vb it is just me.close(). I've tried a bunch of ways to
close the form but C# is acting pretty dumb also. I can't find a way to
close it. Here are some of the things I've tried:
private void button1_Click(object sender, System.EventArgs e)
{
// Form1 frmI = new Form1();
// DialogResult dr = frmI.ShowDialog();
Form1.Quit();
// this.Hide();
}
The new form seems to recreate the form - that is a total nightmare. Hide
doesn't end the program and Close just gets a message that says close is not
defined.
may sound dumb. In vb it is just me.close(). I've tried a bunch of ways to
close the form but C# is acting pretty dumb also. I can't find a way to
close it. Here are some of the things I've tried:
private void button1_Click(object sender, System.EventArgs e)
{
// Form1 frmI = new Form1();
// DialogResult dr = frmI.ShowDialog();
Form1.Quit();
// this.Hide();
}
The new form seems to recreate the form - that is a total nightmare. Hide
doesn't end the program and Close just gets a message that says close is not
defined.