Click here to Skip to main content
15,902,896 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: multiple forms Pin
MatrixCoder20-Mar-07 10:08
MatrixCoder20-Mar-07 10:08 
GeneralRe: multiple forms Pin
manni_n20-Mar-07 10:38
manni_n20-Mar-07 10:38 
GeneralRe: multiple forms Pin
MatrixCoder20-Mar-07 10:42
MatrixCoder20-Mar-07 10:42 
GeneralRe: multiple forms Pin
manni_n20-Mar-07 10:48
manni_n20-Mar-07 10:48 
GeneralRe: multiple forms Pin
MatrixCoder20-Mar-07 11:12
MatrixCoder20-Mar-07 11:12 
GeneralRe: multiple forms Pin
manni_n20-Mar-07 11:22
manni_n20-Mar-07 11:22 
GeneralRe: multiple forms Pin
MatrixCoder20-Mar-07 11:33
MatrixCoder20-Mar-07 11:33 
AnswerRe: multiple forms [modified] Pin
TwoFaced20-Mar-07 12:16
TwoFaced20-Mar-07 12:16 
Give this a try. What I've done is added a handler for the child forms formclosed event. This way we know when the child is closed and can close too.
Public Class Form1

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Dim a As New Form1
        'Register our method (ChildClosed) with the new forms FormClosed event
        AddHandler a.FormClosed, AddressOf ChildClosed
        a.Show()
    End Sub

    'When the child closes this method will run which will close the current form
    Private Sub ChildClosed(ByVal sender As System.Object, ByVal e As System.Windows.Forms.FormClosedEventArgs)
        Me.Close()
    End Sub
End Class


***EDIT***
Also what are you doing to go back?

**EDIT2***
Oh, ya. You can also just use 'End' or 'Application.exit' to shutdown everything. I forgot about the easy answer Smile | :)
GeneralRe: multiple forms Pin
manni_n20-Mar-07 20:26
manni_n20-Mar-07 20:26 
GeneralRe: multiple forms Pin
TwoFaced20-Mar-07 20:44
TwoFaced20-Mar-07 20:44 
AnswerRe: multiple forms Pin
Christian Graus20-Mar-07 17:48
protectorChristian Graus20-Mar-07 17:48 
Questionbase64_decode Pin
Liottru20-Mar-07 9:30
Liottru20-Mar-07 9:30 
AnswerRe: base64_decode Pin
Guffa20-Mar-07 14:40
Guffa20-Mar-07 14:40 
GeneralRe: base64_decode Pin
Liottru20-Mar-07 21:21
Liottru20-Mar-07 21:21 
Questionvalidation in windows application Pin
amruta_muley20-Mar-07 7:45
amruta_muley20-Mar-07 7:45 
AnswerRe: validation in windows application Pin
Dave Kreskowiak20-Mar-07 7:57
mveDave Kreskowiak20-Mar-07 7:57 
AnswerRe: validation in windows application Pin
manni_n20-Mar-07 9:47
manni_n20-Mar-07 9:47 
AnswerRe: validation in windows application Pin
amruta_muley20-Mar-07 17:23
amruta_muley20-Mar-07 17:23 
GeneralRe: validation in windows application Pin
manni_n20-Mar-07 20:38
manni_n20-Mar-07 20:38 
AnswerRe: validation in windows application Pin
Christian Graus20-Mar-07 17:49
protectorChristian Graus20-Mar-07 17:49 
QuestionVB.Net 2.0 Checkbook Register? Pin
Owen3720-Mar-07 7:13
Owen3720-Mar-07 7:13 
AnswerRe: VB.Net 2.0 Checkbook Register? Pin
Dave Kreskowiak20-Mar-07 7:54
mveDave Kreskowiak20-Mar-07 7:54 
GeneralRe: VB.Net 2.0 Checkbook Register? Pin
Owen3720-Mar-07 8:04
Owen3720-Mar-07 8:04 
GeneralRe: VB.Net 2.0 Checkbook Register? Pin
Dave Kreskowiak20-Mar-07 8:43
mveDave Kreskowiak20-Mar-07 8:43 
GeneralRe: VB.Net 2.0 Checkbook Register? Pin
Owen3720-Mar-07 9:53
Owen3720-Mar-07 9:53 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.