home *** CD-ROM | disk | FTP | other *** search
- VERSION 2.00
- Begin Form fProp
- AutoRedraw = -1 'True
- BackColor = &H00C0C0C0&
- Caption = "Proportional Resizing : Resize the form"
- ClientHeight = 4365
- ClientLeft = 570
- ClientTop = 1590
- ClientWidth = 5925
- ClipControls = 0 'False
- Height = 4830
- Left = 480
- LinkTopic = "Form1"
- ScaleHeight = 218.25
- ScaleMode = 2 'Point
- ScaleWidth = 296.25
- Top = 1215
- Width = 6105
- Begin VideoSoftElastic VSElastic1
- Align = 5 'Fill Container
- AutoSizeChildren= 7 'Proportional
- BevelInner = 0 'None
- BevelInnerWidth = 4
- BevelOuter = 1 'Raised
- BevelOuterWidth = 1
- Height = 4365
- Left = 0
- TabIndex = 0
- Top = 0
- Width = 5925
- Begin VideoSoftElastic VSElastic2
- AutoSizeChildren= 1 'Even Horizontal
- BevelInner = 0 'None
- BevelInnerWidth = 3
- BevelOuter = 0 'None
- BorderWidth = -1
- Height = 1230
- Left = 600
- TabIndex = 4
- Top = 1020
- Width = 1215
- Begin Image Image1
- Height = 1260
- Left = -15
- Picture = FPROP.FRX:0000
- Stretch = -1 'True
- Top = -15
- Width = 1245
- End
- End
- 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
- ForeColor = &H00800000&
- Height = 540
- Left = 3045
- TabIndex = 3
- Top = 3390
- Width = 2490
- 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 = 735
- Left = 255
- TabIndex = 2
- Top = 3315
- Width = 2310
- End
- Begin TextBox Text1
- Alignment = 2 'Center
- BackColor = &H00C0C0C0&
- FontBold = -1 'True
- FontItalic = 0 'False
- FontName = "Arial"
- FontSize = 12
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- ForeColor = &H00800000&
- Height = 2250
- Left = 2160
- MultiLine = -1 'True
- TabIndex = 1
- Text = "Proportional Resizing locks the controls in place at design time"
- Top = 525
- Width = 3330
- 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 Form_Resize ()
- '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
- 'oh = vselastic1.Height
- End Sub
-