You must Sign In to post a response.
  • Category: Visual Studio

    How to Exit Only particular form not Exit MDI form or Whole Application ?

    I am work with multiple form in single application, that time I am Execute application and filled data and i am Exit only one form not a Main form ( MDI FORM ) but some kind of mistake so MDI form is also Exit or application Execution stop.

    Can any one please help me it's urgent?

    thanks and regards,

    Deep Chothani.
  • #765659
    if ypou have use MDI parent then all form should open as MDI child not a individual form. see below snippet

    //open form as MDI child
    Form1 form1 = new Form1();
    form1.MdiParent = this.MdiParent;

    //close only MDI child
    if (ActiveMdiChild != null)

    if you are not opening form as MDI child then it will close whole application.

    Editor, DotNetSpider MVM
    Microsoft MVP 2014 [ASP.NET/IIS]

Sign In to post your comments