I have a MDI Child form (frmReview) that I aim to show on my maximized parent form with the following code:
Public Sub frmTransport_KeyDown(sender As System.Object, e As System.Windows.Forms.KeyEventArgs) Handles MyBase.KeyDown
'keyboard shortcuts
If e.KeyCode = Keys.F1 Then LaunchManual()
If e.Control Then
If e.KeyValue = Keys.R Then
Me.WindowState = FormWindowState.Maximized
Dim review As New frmReview
review.MdiParent = Me
review.Location = New Point(1175, 0)
review.BringToFront()
review.Show()
End If
...
...
End Sub
The point (1175, 0) is the top-right corner where the TabControl meets the Yellow mdi Container. The parent form has its isMdiContainer property set to True and Load event of frmReview does fire when i run this code, but I do not see the child form:
In another program I have, I use to same process to display MDI Child Forms and it works fine. Any suggestions on why this is happening?
Thanks in advance!
Location
corresponds to the top left corner of a control, and you are setting that to the top right corner of the parent? Try (588, 0), it should be in the middle. You just need to do the math for the proper location – djv