Solved

MDI FORM (VB.NET 2003)

Posted on 2011-02-10
8
467 Views
Last Modified: 2012-05-11
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
Comment
Question by:RobertoFreemano
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 4
8 Comments
 
LVL 86

Accepted Solution

by:
Mike Tomlinson earned 110 total points
ID: 34865487
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
 

Author Comment

by:RobertoFreemano
ID: 34865676
Thanks Idle_Mind,

Is there a way to maximize the FORM2 MDI?

Me.LayoutMdi(MdiLayout.????)
0
 
LVL 86

Expert Comment

by:Mike Tomlinson
ID: 34865734
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
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:RobertoFreemano
ID: 34865984
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
 
LVL 86

Expert Comment

by:Mike Tomlinson
ID: 34865994
What is the goal here?...to maximize all currently open Mdi children?
0
 

Author Comment

by:RobertoFreemano
ID: 34866131
is that possible?
To be honest Idle_Mind, it's not that important ;)

Roberto
0
 

Author Closing Comment

by:RobertoFreemano
ID: 34866137
Thanks again (friend) :)
0
 
LVL 86

Expert Comment

by:Mike Tomlinson
ID: 34866165
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: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Since .Net 2.0, Visual Basic has made it easy to create a splash screen and set it via the "Splash Screen" drop down in the Project Properties.  A splash screen set in this manner is automatically created, displayed and closed by the framework itsel…
1.0 - Introduction Converting Visual Basic 6.0 (VB6) to Visual Basic 2008+ (VB.NET). If ever there was a subject full of murkiness and bad decisions, it is this one!   The first problem seems to be that people considering this task of converting…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

726 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question