I have MDI form entitled Form1, A childform entitled frmRectRect and another form shown modally entitled Form2.
I would like to display frmRectRect as a child of Form1 by clicking on a button on Form2.
I have the following sub in Form1:
This works fine if I call it from Form1, but from Form2 it's not working.
This is the code I'm attempting to use from Form2:
At a loss,
Harold
***You can't change your past, but you can change your future***
I would like to display frmRectRect as a child of Form1 by clicking on a button on Form2.
I have the following sub in Form1:
Code:
Sub ShowMdiChildWindow()
Dim frm As New frmRectRect()
frm.MdiParent = Me
frm.WindowState = FormWindowState.Maximized
frm.Show()
End Sub
This is the code I'm attempting to use from Form2:
Code:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim frm As New Form1()
frm.ShowMdiChildWindow()
Me.Hide()
End Sub
Harold
***You can't change your past, but you can change your future***