How to close a different WinForm from another's WinForm's code?

Posted by Soo on Stack Overflow See other posts from Stack Overflow or by Soo
Published on 2010-05-28T18:53:41Z Indexed on 2010/05/28 19:02 UTC
Read the original article Hit count: 216

Filed under:
|

The title says it all: How can I close a different WinForm (B) from a different WinForm's (A) code?

I already have it set up so WinForm (B) gets opened in WinForm (A)'s code:

Form2 form2 = new Form2();
form2.ShowDialog();

© Stack Overflow or respective owner

Related posts about c#

Related posts about winforms