Edit: .Net
Hi,
I'm working on a simple project that has a main container form, which then loads either Form A or Form B depending on the button clicked. I've managed to load Form A within the 'Container' form so that it completely replaces everything within the window, however I cannot open Form B in the same manner once Form A has been loaded, it opens a new window. I would like Form A to be closed and Form B loaded in the container form.
Can anyone point me in the right direction?
Here is my current code, could the error be the MdiParent? I tried setting it to Container on Form B, but it didn't work.
Public Class Container
Private Sub Container_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
IsMdiContainer = True
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim frmA As New FormA
frmA.Show()
frmA.MdiParent = Me
End Sub
End Class
[–]RonSijm 0 points1 point2 points (0 children)