Results 1 to 4 of 4

Thread: resize

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Jan 1999
    Posts
    204

    Question

    how do i maek something not teh saem size but when you resize the from it dose not maek t the same size i tried this
    Code:
    what.width=me.scalewidth-400
    thansk
    WHat would we do with out Microsoft.
    A lot more.

  2. #2
    Guest
    Try this. Put it in the Resize event of the Form.

    Code:
    Private Sub Form_Resize()
    
        MyControl.Move 0, 0, Me.ScaleWidth, Me.ScaleHeight
    
    End Sub

  3. #3
    Fanatic Member
    Join Date
    Jan 1999
    Location
    UK
    Posts
    554

    Wink Maybe This May Help?

    Some time ago somebody asked for THE ocx for resizing the contents of any form.

    Unfortunately I could not find the OCX but did find some code which was posted (somewhere)

    So I'll post it again - i'm sure you find what you need in the code.

    I may even turn it into and ocx and post it on my website - if time permits.

    Heres the code.
    Code:
    Option Explicit 
    'declare a struct to save the object size values in
    Private Type ControlsSizes
      csTop As Single
      csLeft As Single
      csWidth As Single
      csHeight As Single 
    End Type 
    'implement the struct
    Private AllControls() As ControlsSizes 
    
    
    'The Initialize Event for the form
    Private Sub Form_Initialize() 
    
    Dim counta As Integer 
    
    'store all app startup object size.position values
    ReDim Preserve AllControls(Controls.Count - 1) 
    For counta = 0 To Controls.Count - 1 
      With AllControls(counta)
        .csTop = Controls(counta).Top / ScaleHeight
        .csLeft = Controls(counta).Left / ScaleWidth
        .csWidth = Controls(counta).Width / ScaleWidth 
        .csHeight = Controls(counta).Height / ScaleHeight 
      End With 
    Next 
    
    End Sub 
    
    
    Private Sub Do_Resize() 
    'This routine does the resizing 
    Dim counta As Integer 
    
    For counta = 0 To Controls.Count - 1 
      'with each control
      With AllControls(counta) 
        Controls(counta).Move .csLeft * ScaleWidth, .csTop * ScaleHeight, .csWidth * ScaleWidth, .csHeight * ScaleHeight 
      End With 
    Next 
    
    End Sub 
    
    
    Private Sub Form_Resize() 
    'the form resize event
    'force all form content size/position 
    'to be refreshed/redrawn
    Do_Resize 
    
    End Sub

    DocZaf
    {;->

  4. #4
    New Member
    Join Date
    Jul 2000
    Posts
    5
    I got a copy of a resizer control so if anyone wants it they can email me [email protected]

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width