Print Page | Close Window

CommandBar and other controls' position

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=15515
Printed Date: 06 October 2024 at 4:27pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: CommandBar and other controls' position
Posted By: okosv
Subject: CommandBar and other controls' position
Date Posted: 31 October 2009 at 7:59am
Hi CodeJock,
I'm using VB6 to develop the soft, and there is some problem which I can't to solve.
There is form, and in it form is one command bar object (toolbar) and frame control, toolbar is located on top of form. How can I set position of frame, thus that frame was below of commandbar object.
I tried to use GetClientRect, than add some fixed value to bottom value, but in other computers with different screen resolution, and default windows theme, it not given necessary results.
How can I do it?
Thank u



Replies:
Posted By: Oleg
Date Posted: 02 November 2009 at 7:46am
Hi,
 
 
from SDI sample:
 
Private Sub CommandBars_Resize()
   
    On Error Resume Next
   
    Dim Left As Long
    Dim Top As Long
    Dim Right As Long
    Dim Bottom As Long
   
    CommandBars.GetClientRect Left, Top, Right, Bottom
    rtfText.Move Left, Top, Right - Left, Bottom - Top
    rtfText.RightMargin = IIf(rtfText.Width > 400, rtfText.Width - 400, rtfText.Width)
End Sub


-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS



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