How do I prevent a form object from disposing on close?

后端 未结 5 572
南方客
南方客 2020-12-06 10:27

I am using an MDIParent Form. When I close its child, the object of the child disposes. Is there a way to set child visibility to false instead of disposing?

5条回答
  •  情深已故
    2020-12-06 10:52

    Sure, you can cancel the close and hide it. It doesn't seem like a good thing to do, but you definitely can.

    See Form.FormClosing Event (MSDN).

提交回复
热议问题