[Resolved]How to close the mdiform with childform ? thanks for help :=)
Hi ,
I would like to close the mdiform by childform. how can i do it ?
Example, i want to do the log off function. when the user click on log off. all application will close up and load the login form.The log off action from childform instead of parentform.
My coding as below :
Code:
dim A as new mdiform
dim B as new form1 'Not childform
B.show()
A.hide()
Re: [Resolved]How to close the mdiform with childform ? thanks for help :=)
I'm not entirely sure that I understand fully but I think you are asking this.
Open a new child form from the MdiParent:
Code:
Public Class Form1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim f As New Form2()
f.MdiParent = Me
f.Show()
End Sub
End Class
Open a form from that child that is not a child form and then hide everything else:
Code:
Public Class Form2
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim f As New Form3()
f.Show()
Me.Parent.Parent.Hide()
End Sub
End Class
Hope that helps a little...if I got the question right. :bigyello: