how to make a normal form behave like a child form inside an MDI form - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

how to make a normal form behave like a child form inside an MDI form

srinatsrinat Posts: 6Member
I have an MDIform in an exe
I have a toolbar added to it
I have a child form
I also have a normal form

Maximising a normal form should work exactly like the child form

Please help

Also I have used setparent API for the normal form to stay on top of the application

Comments

  • BitByBit_ThorBitByBit_Thor Posts: 2,444Member
    : I have an MDIform in an exe
    : I have a toolbar added to it
    : I have a child form
    : I also have a normal form
    :
    : Maximising a normal form should work exactly like the child form
    :

    Then make it a child form, no?

    : Also I have used setparent API for the normal form to stay on top of the application
    :

    SetParent API sets (as it says) the Parent of the Form. Which means that the Normal Form will get stuck in the MDI form, if all goes well.
    I take it that's what you meant with "stay on top"?

    At any rate, just change the normal form to an MDI Child Form, cause that's the way it was meant to work.

    What happens if you use Maximized on the 'captured' normal form?


    Best Regards,
    Richard

    The way I see it... Well, it's all pretty blurry

  • srinatsrinat Posts: 6Member
    Richard:
    At any rate, just change the normal form to an MDI Child Form, cause that's the way it was meant to work.

    Vidya :

    No..But my normal form is in another DLL
    The following is my setup

    I have a project exe
    I have an MDI and a child form
    I have a reference to another DLL
    The DLL contains a normal form
    Now, from MDI toolbar, I call the normal form
    Using setparent API , I got rid of the formonTop problem
    The only problem now is
    When I maximize, the toolbar gets hidden..This is not the case with a child form..
    I need this behaviour from a normal form too...Please help

  • BitByBit_ThorBitByBit_Thor Posts: 2,444Member
    Well... that, I think, is part of the special functionality of the MDI Parent/Child interaction.

    But just to be sure, what do you mean by 'toolbar'?
    Are you refering to the default Windows window title and controls (like minimize _, maximize and close x), or would you mean the menu, like the one in my browser, where it says File, Edit, View, Favorites etc?

    Best Regards,
    Richard

    The way I see it... Well, it's all pretty blurry

  • srinatsrinat Posts: 6Member
    Toolbar means
    the menu, like the one in ur browser, where it says File, Edit, View, Favorites etc
    :
    : Best Regards,
    : vidya
    :


  • srinatsrinat Posts: 6Member
    : Toolbar means
    : the buttons under the one in ur browser, where it says File, Edit, View, Favorites etc (in the form of graphic imaged buttons
    or we can call it the command bar
    : :
    : : Best Regards,
    : : vidya
    : :
    :
    :
    :

  • srinatsrinat Posts: 6Member
    : : Toolbar means
    : : the buttons under the one in ur browser, where it says File, Edit, View, Favorites etc (in the form of graphic imaged buttons
    : or we can call it the command bar

    How can we set a form to a perfect MDIChild by sending WM_PARENTNOTIFY to the 'MDIClient' window ?

    : : :
    : : : Best Regards,
    : : : vidya
    : : :

Sign In or Register to comment.