|
-
Jun 12th, 2006, 10:51 AM
#1
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
-
Jul 17th, 2006, 07:40 AM
#2
Hyperactive Member
Re: Mdi Child Load Maximized error
Has anyone got a solution to this im having the same issue
Regards
Danny
-
Jul 17th, 2006, 07:57 AM
#3
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...
-
Jul 17th, 2006, 08:18 AM
#4
Hyperactive Member
Re: Mdi Child Load Maximized error
So the midparent thing is the extra code
thats the only like that is different to my code!
-
Jul 17th, 2006, 08:30 AM
#5
Re: Mdi Child Load Maximized error
thats the only like that is different to my code!
So.... Did it work or still having issues?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|