|
-
Jul 6th, 2000, 06:17 PM
#1
Thread Starter
Addicted Member
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.
-
Jul 6th, 2000, 06:19 PM
#2
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
-
Jul 6th, 2000, 07:44 PM
#3
Fanatic Member
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
{;->
-
Jul 6th, 2000, 08:05 PM
#4
New Member
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|