Results 1 to 9 of 9

Thread: MDI Form with child forms - External form/window to interact with child forms?

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Aug 2001
    Location
    New York
    Posts
    165

    Question MDI Form with child forms - External form/window to interact with child forms?

    Hi,

    I am creating an application which has an MDI Form containing 2 child forms.

    I need to somehow create either a floating toolbar or some sort of external form (ie. not a child form) which is able to interact with the child forms.

    Is this possible? If so, any feedback on how to create it would be much appreciated

    Thanks,

    Chris

  2. #2
    I'm about to be a PowerPoster! Joacim Andersson's Avatar
    Join Date
    Jan 1999
    Location
    Sweden
    Posts
    14,649
    You simply create the new form and load it like this:
    VB Code:
    1. FormName.Show vbModeless, frmMDI
    This will keep the form above the MDI form even when it lose focus.
    You can then reference the active child form in this manner:
    VB Code:
    1. frmMDI.ActiveForm.Caption = "Hello, the caption for this form has just been changed"
    Best regards

  3. #3
    I'm about to be a PowerPoster! kleinma's Avatar
    Join Date
    Nov 2001
    Location
    NJ - USA (Near NYC)
    Posts
    23,373
    or you can add toolbars/coolbars (which are floatable) directly to the MDI form

  4. #4

    Thread Starter
    Addicted Member
    Join Date
    Aug 2001
    Location
    New York
    Posts
    165
    Originally posted by kleinma
    or you can add toolbars/coolbars (which are floatable) directly to the MDI form
    That sounds perfect! How do I add a floatable toolbar/coolbar?

    I have tried adding a toolbar via the Project -> Components route, but it seems I am only able to add one which docks itself to the top of the MDI window.

    A Floatable TB would be great

    Any ideas?

    Thanks.

  5. #5
    I'm about to be a PowerPoster! kleinma's Avatar
    Join Date
    Nov 2001
    Location
    NJ - USA (Near NYC)
    Posts
    23,373
    the coolbar control is found in components under Microsoft Windows Common Controls-3 6.0 (sp5)

    i don't think you have to have sp5 for VB.. but if you don't i would recommend it anyway

    coolbars are the new toolbars the MS uses.. like the toolbars that VB uses that you can doc or drag around

  6. #6

    Thread Starter
    Addicted Member
    Join Date
    Aug 2001
    Location
    New York
    Posts
    165
    Found it, thanks

    I am having a bit of trouble getting it to float though. It appears I can only add it as a docked toolbar.

    Any ideas?

    Thanks.

  7. #7
    I'm about to be a PowerPoster! Joacim Andersson's Avatar
    Join Date
    Jan 1999
    Location
    Sweden
    Posts
    14,649
    The Toolbar and the Rebar (Coolbar) controls that comes with VB can't float by default.

  8. #8

    Thread Starter
    Addicted Member
    Join Date
    Aug 2001
    Location
    New York
    Posts
    165
    Originally posted by Joacim Andersson
    The Toolbar and the Rebar (Coolbar) controls that comes with VB can't float by default.
    I see. Is it possible to get them to float at run-time?

    Thanks.

  9. #9
    I'm about to be a PowerPoster! Joacim Andersson's Avatar
    Join Date
    Jan 1999
    Location
    Sweden
    Posts
    14,649
    No you have to add them to a seperat form and show that form in the way I showed you in my first post.

    Best regards

    Joacim Andersson

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width