MDI Form Question

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Fred

    MDI Form Question

    Hi,

    I have an MDI form and i want to use the background to display data
    relevant to the application. Basically its just a load of labels in
    groupboxes. It works except the groupboxes sit onto of all the MDI
    children. I have tried playing with TopMost, send to back etc etc but
    no matter what i do I cant get the forms in front of the groupboxes. :(

    Any ideas?


    Thanks Fred

  • Cor Ligthert [MVP]

    #2
    Re: MDI Form Question

    Fred,

    I don't know if others understand your problem direct. What background are
    you talking about?

    Cor

    "Fred" <fred@fredthoma s.co.uk> schreef in bericht
    news:1151195486 .270148.293710@ m73g2000cwd.goo glegroups.com.. .[color=blue]
    > Hi,
    >
    > I have an MDI form and i want to use the background to display data
    > relevant to the application. Basically its just a load of labels in
    > groupboxes. It works except the groupboxes sit onto of all the MDI
    > children. I have tried playing with TopMost, send to back etc etc but
    > no matter what i do I cant get the forms in front of the groupboxes. :(
    >
    > Any ideas?
    >
    >
    > Thanks Fred
    >[/color]


    Comment

    • gene kelley

      #3
      Re: MDI Form Question

      On 24 Jun 2006 17:31:26 -0700, "Fred" <fred@fredthoma s.co.uk> wrote:
      [color=blue]
      >Hi,
      >
      >I have an MDI form and i want to use the background to display data
      >relevant to the application. Basically its just a load of labels in
      >groupboxes. It works except the groupboxes sit onto of all the MDI
      >children. I have tried playing with TopMost, send to back etc etc but
      >no matter what i do I cant get the forms in front of the groupboxes. :(
      >
      >Any ideas?
      >
      >
      >Thanks Fred[/color]

      For all practical purposes, it's not possible to display a control
      behind ChildForm(s) in the MDIForm client area.

      The only practical client "background " is with the BackgroundImage
      Property.

      Gene

      Comment

      • Fred

        #4
        Re: MDI Form Question

        Hi Cor,

        Thanks for replying.

        The background I am talking about is this:

        Imagine you have an MDI container window open with no other open forms
        and the MDI container is maximised. You will have a whole window with
        nothing in it. Its that I want to use.

        In VB6 it would not let you put a label (or most other controls)
        directly on the MDI parent but VB.NET does. In VB 6 I got round this
        by creating a MDI Child that sat on the parent background and I set it
        to always be behind all other forms using zorder. As VB.NET allows me
        to put label directly onto the MDI container I was hoping I would be
        able to set all the controls to be behind any open forms.

        Does that make sense?!?

        Thanks

        Fred

        Cor Ligthert [MVP] wrote:[color=blue]
        > Fred,
        >
        > I don't know if others understand your problem direct. What background are
        > you talking about?
        >
        > Cor
        >
        > "Fred" <fred@fredthoma s.co.uk> schreef in bericht
        > news:1151195486 .270148.293710@ m73g2000cwd.goo glegroups.com.. .[color=green]
        > > Hi,
        > >
        > > I have an MDI form and i want to use the background to display data
        > > relevant to the application. Basically its just a load of labels in
        > > groupboxes. It works except the groupboxes sit onto of all the MDI
        > > children. I have tried playing with TopMost, send to back etc etc but
        > > no matter what i do I cant get the forms in front of the groupboxes. :(
        > >
        > > Any ideas?
        > >
        > >
        > > Thanks Fred
        > >[/color][/color]

        Comment

        • Fred

          #5
          Re: MDI Form Question

          Hi Gene,

          Thanks for the reply.

          So I guess I will have to do the work around I used with VB 6 (see my
          other post)?

          Thanks

          Fred

          gene kelley wrote:[color=blue]
          > On 24 Jun 2006 17:31:26 -0700, "Fred" <fred@fredthoma s.co.uk> wrote:
          >[color=green]
          > >Hi,
          > >
          > >I have an MDI form and i want to use the background to display data
          > >relevant to the application. Basically its just a load of labels in
          > >groupboxes. It works except the groupboxes sit onto of all the MDI
          > >children. I have tried playing with TopMost, send to back etc etc but
          > >no matter what i do I cant get the forms in front of the groupboxes. :(
          > >
          > >Any ideas?
          > >
          > >
          > >Thanks Fred[/color]
          >
          > For all practical purposes, it's not possible to display a control
          > behind ChildForm(s) in the MDIForm client area.
          >
          > The only practical client "background " is with the BackgroundImage
          > Property.
          >
          > Gene[/color]

          Comment

          • Cor Ligthert [MVP]

            #6
            Re: MDI Form Question

            Hi Fred,

            Did you try to set a panel (docked full) on your form and hide that if you
            want to show the MDI container and visa versa?

            Cor

            "Fred" <fred@fredthoma s.co.uk> schreef in bericht
            news:1151230293 .097331.242660@ u72g2000cwu.goo glegroups.com.. .[color=blue]
            > Hi Cor,
            >
            > Thanks for replying.
            >
            > The background I am talking about is this:
            >
            > Imagine you have an MDI container window open with no other open forms
            > and the MDI container is maximised. You will have a whole window with
            > nothing in it. Its that I want to use.
            >
            > In VB6 it would not let you put a label (or most other controls)
            > directly on the MDI parent but VB.NET does. In VB 6 I got round this
            > by creating a MDI Child that sat on the parent background and I set it
            > to always be behind all other forms using zorder. As VB.NET allows me
            > to put label directly onto the MDI container I was hoping I would be
            > able to set all the controls to be behind any open forms.
            >
            > Does that make sense?!?
            >
            > Thanks
            >
            > Fred
            >
            > Cor Ligthert [MVP] wrote:[color=green]
            >> Fred,
            >>
            >> I don't know if others understand your problem direct. What background
            >> are
            >> you talking about?
            >>
            >> Cor
            >>
            >> "Fred" <fred@fredthoma s.co.uk> schreef in bericht
            >> news:1151195486 .270148.293710@ m73g2000cwd.goo glegroups.com.. .[color=darkred]
            >> > Hi,
            >> >
            >> > I have an MDI form and i want to use the background to display data
            >> > relevant to the application. Basically its just a load of labels in
            >> > groupboxes. It works except the groupboxes sit onto of all the MDI
            >> > children. I have tried playing with TopMost, send to back etc etc but
            >> > no matter what i do I cant get the forms in front of the groupboxes. :(
            >> >
            >> > Any ideas?
            >> >
            >> >
            >> > Thanks Fred
            >> >[/color][/color]
            >[/color]


            Comment

            • R. MacDonald

              #7
              Re: MDI Form Question

              Hello, Fred,

              You can do what you want by putting the controls on the "MDIClient" .
              This doesn't show up as an available control within the intelli-sense of
              the MDI form, but you can find it by iterating through the controls on
              the MDI form and comparing the TypeOf each to MdiCLient.

              Private WithEvents MDI_Frame As MdiClient

              For Each CurrentItem As Control In Me.Controls
              If (TypeOf CurrentItem Is MdiClient) Then
              MDI_Frame = DirectCast(Curr entItem, MdiClient)
              Exit For
              End If
              Next CurrentItem

              Cheers,
              Randy


              Fred wrote:[color=blue]
              > Hi,
              >
              > I have an MDI form and i want to use the background to display data
              > relevant to the application. Basically its just a load of labels in
              > groupboxes. It works except the groupboxes sit onto of all the MDI
              > children. I have tried playing with TopMost, send to back etc etc but
              > no matter what i do I cant get the forms in front of the groupboxes. :(
              >
              > Any ideas?
              >
              >
              > Thanks Fred
              >[/color]

              Comment

              • Miro

                #8
                Re: MDI Form Question

                Im running into a simillar problem.

                Just wondering if you did come up with a solution ?

                I too want to put some background "objects" like pictures and stuff on the
                back wall of the MDI form.

                Just wondering if you scrapped it, or did come up with a solution.

                Thanks

                Miro

                "Fred" <fred@fredthoma s.co.ukwrote in message
                news:1151230384 .115541.130570@ m73g2000cwd.goo glegroups.com.. .
                Hi Gene,
                >
                Thanks for the reply.
                >
                So I guess I will have to do the work around I used with VB 6 (see my
                other post)?
                >
                Thanks
                >
                Fred
                >
                gene kelley wrote:
                >On 24 Jun 2006 17:31:26 -0700, "Fred" <fred@fredthoma s.co.ukwrote:
                >>
                >Hi,
                >
                >I have an MDI form and i want to use the background to display data
                >relevant to the application. Basically its just a load of labels in
                >groupboxes. It works except the groupboxes sit onto of all the MDI
                >children. I have tried playing with TopMost, send to back etc etc but
                >no matter what i do I cant get the forms in front of the groupboxes. :(
                >
                >Any ideas?
                >
                >
                >Thanks Fred
                >>
                >For all practical purposes, it's not possible to display a control
                >behind ChildForm(s) in the MDIForm client area.
                >>
                >The only practical client "background " is with the BackgroundImage
                >Property.
                >>
                >Gene
                >

                Comment

                Working...