Print Page | Close Window

Problems with MDI Form

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Command Bars
Forum Description: Topics Related to Codejock Command Bars
URL: http://forum.codejock.com/forum_posts.asp?TID=1865
Printed Date: 02 July 2024 at 6:01pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Problems with MDI Form
Posted By: nando_uy
Subject: Problems with MDI Form
Date Posted: 27 February 2005 at 7:03am

Hi all:

I need to use a toolbar and a taskpane toghether in the same MDI form.

The problem is, the toolbars position (docking TOP) it's ok, but, when I use the taskpane, (docking on left) at desing time,taskpane extends to all height of the MDI form.

when I run the program, taskpane virtually DISSAPEAR and ONLY draw over a commandbar.

Can I use both controls in the same MDI?. What can I do that a taskpane top begins below the command bar? (In an SDI form I haven't problems!!!)




Replies:
Posted By: ianp
Date Posted: 27 February 2005 at 8:18am

Take a look at the ToolBox sample, it contains the following code in the CommandBars_Resize event:


Private Sub CommandBars_Resize()
    On Error Resume Next
   
    Dim Left As Long, Top As Long, Right As Long, Bottom As Long, nWidth As Long
    
    CommandBars.GetClientRect Left, Top, Right, Bottom

    nWidth = IIf(Right - Left < 3000, Right - Left, 3000)
    wndToolBox.Move Left + 40, Top + 40, nWidth, Bottom - Top - 60

End Sub



Posted By: nando_uy
Date Posted: 27 February 2005 at 12:58pm

doesn't work!!!

this proc function properly on a SDI form, but no in an MDI...

What Happend?



Posted By: SuperMario
Date Posted: 27 February 2005 at 3:26pm
Try addeing the following code to the CommandBars_RepositionAlignedControls event assuming you name your TaskPanel "wndTaskPanel":

Private Sub CommandBars_RepositionAlignedControls(Left As Long, Top As Long, Right As Long, Bottom As Long)

    CommandBars.MoveAlignedControl wndTaskPanel, Left, Top, Right, Bottom

End Sub


Posted By: nando_uy
Date Posted: 27 February 2005 at 4:24pm

Great!!!!

thank you very much...

I apreaciate this...




Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net