Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Command Bars
  New Posts New Posts RSS Feed - ClientArea control Resize problem
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

ClientArea control Resize problem

 Post Reply Post Reply
Author
Message
zwdhm View Drop Down
Newbie
Newbie


Joined: 26 October 2004
Status: Offline
Points: 26
Post Options Post Options   Thanks (0) Thanks(0)   Quote zwdhm Quote  Post ReplyReply Direct Link To This Post Topic: ClientArea control Resize problem
    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.

 
The pic below is in running mode.
Back to Top
zwdhm View Drop Down
Newbie
Newbie


Joined: 26 October 2004
Status: Offline
Points: 26
Post Options Post Options   Thanks (0) Thanks(0)   Quote zwdhm Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.141 seconds.