home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
DP Tool Club 12
/
CD_ASCQ_12_0294.iso
/
news
/
2381
/
vcc
/
fprop.frm
< prev
next >
Wrap
Text File
|
1993-10-28
|
3KB
|
112 lines
VERSION 2.00
Begin Form fProp
Caption = "Proportional Resizing : Resize the form"
ClientHeight = 3345
ClientLeft = 1245
ClientTop = 1605
ClientWidth = 5100
Height = 3810
Left = 1155
LinkTopic = "Form1"
ScaleHeight = 3345
ScaleWidth = 5100
Top = 1230
Width = 5280
Begin VideoSoftElastic VSElastic1
Align = 5 'Fill Container
AutoSizeChildren= 7 'Proportional
BackColor = &H00C0C0C0&
BevelInner = 1 'Raised
BevelInnerWidth = 0
BevelOuter = 1 'Raised
BevelOuterWidth = 1
Height = 3345
Left = 0
TabIndex = 0
Top = 0
Width = 5100
Begin CheckBox Check1
BackColor = &H00C0C0C0&
Caption = "Lock Font Size"
FontBold = -1 'True
FontItalic = 0 'False
FontName = "Arial"
FontSize = 12
FontStrikethru = 0 'False
FontUnderline = 0 'False
Height = 615
Left = 2310
TabIndex = 3
Top = 2550
Width = 2445
End
Begin CommandButton Command1
BackColor = &H00C0C0C0&
Caption = "&Help"
FontBold = -1 'True
FontItalic = 0 'False
FontName = "Arial"
FontSize = 12
FontStrikethru = 0 'False
FontUnderline = 0 'False
Height = 555
Left = 210
TabIndex = 2
Top = 2550
Width = 1995
End
Begin TextBox Text1
BackColor = &H00FFFFFF&
FontBold = -1 'True
FontItalic = 0 'False
FontName = "Arial"
FontSize = 12
FontStrikethru = 0 'False
FontUnderline = 0 'False
ForeColor = &H00FF0000&
Height = 1725
Left = 1845
MultiLine = -1 'True
ScrollBars = 2 'Vertical
TabIndex = 1
Text = "Proportional Resizing locks the controls in place at design time"
Top = 405
Width = 2895
End
Begin Image Image1
Height = 1095
Left = 405
Picture = FPROP.FRX:0000
Stretch = -1 'True
Top = 360
Width = 1140
End
End
End
Option Explicit
Dim oh 'original height
Sub Command1_Click ()
MsgBox "This is done with only one elastic that fills the container and its AutoSizeChildren property set to proportional"
End Sub
Sub Form_Load ()
oh = vselastic1.Height
End Sub
Sub VSElastic1_ResizeChildren ()
'Code to Change fonts when form is resized
Dim I%
On Error Resume Next
If check1.Value Then Exit Sub
For I = 0 To Controls.Count - 1
Controls(I).FontSize = 12 * (vselastic1.Height / oh)
Controls(I).FontName = "Arial"
Next I
End Sub