Mdi Child Load Maximized error
Ok, I am pretty new to VB.Net and I am having some trouble with loading a child form into a Mdi form as Maximized. The form appears to be in the maximized state, but the child form does not fill the entire area unless i minimize it and maximize it again.
I set the properties of the shild form to WindowState - Maximized and also set it on load like so
VB Code:
Private Sub lnkAdmin_LinkClicked(ByVal sender As System.Object, ByVal e As System.Windows.Forms.LinkLabelLinkClickedEventArgs) Handles lnkAdmin.LinkClicked
If pnlAdmin.Visible = False Then
pnlAdmin.Visible = True
picSamples.Top = picSamples.Top + 25
lnkSamples.Top = lnkSamples.Top + 25
pnlSamples.Top = pnlSamples.Top + 25
lnkReporting.Top = lnkReporting.Top + 25
picReporting.Top = picReporting.Top + 25
pnlReporting.Top = pnlReporting.Top + 25
picExit.Top = picExit.Top + 25
lnkExit.Top = lnkExit.Top + 25
frmAdminHelp.MdiParent = Me 'here is where i set the mdi parent
frmAdminHelp.WindowState = FormWindowState.Maximized 'Set maximized
frmAdminHelp.Show()
Else
pnlAdmin.Visible = False
picSamples.Top = picSamples.Top - 25
lnkSamples.Top = lnkSamples.Top - 25
pnlSamples.Top = pnlSamples.Top - 25
lnkReporting.Top = lnkReporting.Top - 25
picReporting.Top = picReporting.Top - 25
pnlReporting.Top = pnlReporting.Top - 25
picExit.Top = picExit.Top - 25
lnkExit.Top = lnkExit.Top - 25
frmAdminHelp.Dispose()
End If
End Sub
Re: Mdi Child Load Maximized error
Has anyone got a solution to this im having the same issue
Regards
Danny
Re: Mdi Child Load Maximized error
In 1.1, this worked without a problem:
VB Code:
Private frm2 As New Form2
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
frm2.MdiParent = Me
frm2.WindowState = FormWindowState.Maximized
frm2.Show()
End Sub
I'm not sure what the purpose of the extra code is...
Re: Mdi Child Load Maximized error
So the midparent thing is the extra code
thats the only like that is different to my code!
Re: Mdi Child Load Maximized error
Quote:
thats the only like that is different to my code!
So.... Did it work or still having issues?