Print Page | Close Window

ClientArea control Resize problem

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=5537
Printed Date: 21 November 2024 at 7:56pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: ClientArea control Resize problem
Posted By: zwdhm
Subject: ClientArea control Resize problem
Date Posted: 16 November 2006 at 8:03am

I am using SuitePro ActiveX 10.1 and VB6
I made a user control. CommandBars was used. A FlexGrid control was used as client area control. I use the code below to resize flexgrid.

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

    If Bottom > Top And Right > Left Then
        MsFlexGrid1.Move Left, Top, Right - Left, Bottom - Top
       
    End If
End Sub

Then I put this user control on a form. When in design mode, the flexgrid resizes well. But when the form runs, scrollbars of the flexgrid were out of the form. The screenshots were uploaded.

https://forum.codejock.com/uploads/20061116_075923_screenshots.zip - uploads/20061116_075923_screenshots.zip
 
The pic below is in running mode.



Replies:
Posted By: zwdhm
Date Posted: 16 November 2006 at 8:07am
When in design mode
 
The code below  was used to resize the user control in the form
Private Sub Form_Resize()
     TempControl1.Move 0, 0, Me.Width, Me.Height
End Sub


Posted By: Oleg
Date Posted: 16 November 2006 at 9:11am
Hi,
 
Change to:
 
Private Sub Form_Resize()

     TempControl1.Move 0, 0, Me.ScaleWidth, Me.ScaleHeight

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