|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
MDIParent and MaximizedBounds bug(?)I'm trying to build an MDI application. I've added a 'toolbox' navigation control down the left inside of the parent form. Now I need to change the child forms so they do not hide behind the toolbox when maximized. I am trying to use .MaximizedBounds but its bugged. =( Do any of my fantastic peers have any suggestions? To better understand the issue, do me a favor and try the following: STEP 1: Make a new project STEP 2: Add Form1 and Form2 STEP 3: Add this code to Form1: Private Sub Form1_Load() Me.IsMdiConatiner = True Dim Child1 as new Form2 Child1.Visible = True Dim Child2 as New Form2 Child2.MIDParent = Me Child2.Visible = True End Sub STEP 4: Add this code to Form2: Private Sub Form2_Load() Me.MaximizedBounds = New System.Drawing.Rectangle (25, 25, 200, 200) End Sub STEP 5: Run it Notice how Child1 will comply with the MaximizedBounds setting. Notice how Child2 ignores the MaximizedBounds setting. Bumping for great justice
Show quoteHide quote "imnotamib" wrote: > Howdy! > > I'm trying to build an MDI application. > I've added a 'toolbox' navigation control down the left inside of the parent > form. > Now I need to change the child forms so they do not hide behind the toolbox > when maximized. > I am trying to use .MaximizedBounds but its bugged. =( > Do any of my fantastic peers have any suggestions? > > > To better understand the issue, do me a favor and try the following: > > STEP 1: Make a new project > > STEP 2: Add Form1 and Form2 > > STEP 3: Add this code to Form1: > Private Sub Form1_Load() > Me.IsMdiConatiner = True > Dim Child1 as new Form2 > Child1.Visible = True > Dim Child2 as New Form2 > Child2.MIDParent = Me > Child2.Visible = True > End Sub > > STEP 4: Add this code to Form2: > Private Sub Form2_Load() > Me.MaximizedBounds = New System.Drawing.Rectangle (25, 25, 200, 200) > End Sub > > STEP 5: Run it > > Notice how Child1 will comply with the MaximizedBounds setting. > Notice how Child2 ignores the MaximizedBounds setting.
Show quote
Hide quote
"imnotamib" <imnota***@discussions.microsoft.com> schrieb Right, because it's an MDI child. It's maximized to the size of the > Howdy! > > I'm trying to build an MDI application. > I've added a 'toolbox' navigation control down the left inside of > the parent form. > Now I need to change the child forms so they do not hide behind the > toolbox when maximized. > I am trying to use .MaximizedBounds but its bugged. =( > Do any of my fantastic peers have any suggestions? > > > To better understand the issue, do me a favor and try the following: > > STEP 1: Make a new project > > STEP 2: Add Form1 and Form2 > > STEP 3: Add this code to Form1: > Private Sub Form1_Load() > Me.IsMdiConatiner = True > Dim Child1 as new Form2 > Child1.Visible = True > Dim Child2 as New Form2 > Child2.MIDParent = Me > Child2.Visible = True > End Sub > > STEP 4: Add this code to Form2: > Private Sub Form2_Load() > Me.MaximizedBounds = New System.Drawing.Rectangle (25, 25, 200, 200) > End Sub > > STEP 5: Run it > > Notice how Child1 will comply with the MaximizedBounds setting. > Notice how Child2 ignores the MaximizedBounds setting. MDIContainer. Armin
Show quote
Hide quote
"Armin Zingler" <az.nospam@freenet.de> schrieb I forgot to say:> "imnotamib" <imnota***@discussions.microsoft.com> schrieb > > Howdy! > > > > I'm trying to build an MDI application. > > I've added a 'toolbox' navigation control down the left inside of > > the parent form. > > Now I need to change the child forms so they do not hide behind > > the toolbox when maximized. > > I am trying to use .MaximizedBounds but its bugged. =( > > Do any of my fantastic peers have any suggestions? > > > > > > To better understand the issue, do me a favor and try the > > following: > > > > STEP 1: Make a new project > > > > STEP 2: Add Form1 and Form2 > > > > STEP 3: Add this code to Form1: > > Private Sub Form1_Load() > > Me.IsMdiConatiner = True > > Dim Child1 as new Form2 > > Child1.Visible = True > > Dim Child2 as New Form2 > > Child2.MIDParent = Me > > Child2.Visible = True > > End Sub > > > > STEP 4: Add this code to Form2: > > Private Sub Form2_Load() > > Me.MaximizedBounds = New System.Drawing.Rectangle (25, 25, 200, > > 200) End Sub > > > > STEP 5: Run it > > > > Notice how Child1 will comply with the MaximizedBounds setting. > > Notice how Child2 ignores the MaximizedBounds setting. > > > > Right, because it's an MDI child. It's maximized to the size of the > MDIContainer. If you dock your navigation control within the MDI parent, the child is not hidden behind the control, even if it is maximized. Armin
*@#%! Graphics
Case Sensitive Comparison Try Catch Else Finally Select case wildcard user control dll missing DllRegisterServer Accessing a Share Using Windows Credentials Any way to disable a column in a DataGrid? Dropdownlist Chain Visible Splitting filenames into parts Problem w/ special characters in a filestream |
|||||||||||||||||||||||