[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 477
  • Last Modified:

MDI FORM (VB.NET 2003)

Hi Experts,

I have created a MDI Application which loads Form2 as child MDI...

* - Form1, there is a button (with images on them), I click on Button and Form2 loads in as MDI child.

* If I Maximize my MDI child - Form2, it hides behind the button (the button stays visible in the foregreound, not masked by the Form2 (MDI) window.

I want it to go to background.

Please help.
0
RobertoFreemano
Asked:
RobertoFreemano
  • 4
  • 4
1 Solution
 
Mike TomlinsonMiddle School Assistant TeacherCommented:
That's not the way an MdiParent is designed to work...  =\

What you can do is place a PANEL on the MdiParent and DOCK it to the Left side.  Now place your "image buttons" INSIDE the PANEL and adjust its size accordingly.  Now when Form2 is maximized it will take up the space to the right of panel and not be obscured by the area with the buttons.
0
 
RobertoFreemanoAuthor Commented:
Thanks Idle_Mind,

Is there a way to maximize the FORM2 MDI?

Me.LayoutMdi(MdiLayout.????)
0
 
Mike TomlinsonMiddle School Assistant TeacherCommented:
Just set its WindowState to Maximized before you Show() it:

    Dim F2 As New Form2
    F2.MdiParent = Me
    F2.WindowState = FormWindowState.Maximized
    F2.Show()
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
RobertoFreemanoAuthor Commented:
My code is:

I added this in based on your suggestion: "Forms (intloopindex).WindowState = FormWindowState.Maximaized"

But it didn't work :(

I'm sure your code works ;)

For intloopindex As Imteger = 0 to -
Forms (intloopindex) = New Form2
Forms (intloopindex).Text = ""
Forms (intloopindex).MdiParent = Me
Forms (intloopindex)
Next Forms intloopindex
Me.LayoutMdi(MdiLayout.Cascade)

Open in new window

0
 
Mike TomlinsonMiddle School Assistant TeacherCommented:
What is the goal here?...to maximize all currently open Mdi children?
0
 
RobertoFreemanoAuthor Commented:
is that possible?
To be honest Idle_Mind, it's not that important ;)

Roberto
0
 
RobertoFreemanoAuthor Commented:
Thanks again (friend) :)
0
 
Mike TomlinsonMiddle School Assistant TeacherCommented:
To maximize the children:
If Me.MdiChildren.Count > 0 Then
            Me.MdiChildren(0).WindowState = FormWindowState.Maximized
        End If

Open in new window


*MdiChildren SHARE the WindowState so maximizing one child maximizes them all.
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

  • 4
  • 4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now