Tuesday, November 27, 2012

Closing Parent Form from Child Form in VB.NET

The Application.Exit() call can be made in the child form's FormClosed event to exist the app when the child form is closed.


    Private Sub Form_Child_FormClosed(sender As Object, e As System.Windows.Forms.FormClosedEventArgs) Handles Me.FormClosed

        Application.Exit()

    End Sub

No comments: