Quantcast
Channel: Windows Forms General forum
Viewing all articles
Browse latest Browse all 12583

Can't Change Form C#

$
0
0

I'm trying to take a form and put another in its place. I start out with the code:

private void button1_Click(object sender, EventArgs e)
    {
    new Form2().Visible = true;
    }

That works. But when I tell the current form to close, it fails.

this.Close()

Any ideas how I can make this work?


Viewing all articles
Browse latest Browse all 12583

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>