Hey :D

So I got two forms, form1 and form2

when i click on a button on form1, it will show form2 and hide form1
once, on form2 i got a button "cancel", when i click on that button i need to close it and unhide form1 and not open a new instance


this is what i got on form2:

this.Owner.Show();
this.Close();

and i dont know how to get it working :D

If you create a new form and you don't assign its owner property I guess nothing much will happen.

If you create a new form and you don't assign its owner property I guess nothing much will happen.

ohhh, that was stupid :|
Thanks man

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.