home *** CD-ROM | disk | FTP | other *** search
- Type FormMasterForm From SampleMasterForm
- Dim chkGridOn As New CheckBox
- Dim chkShowOrder As New CheckBox
- Dim Label1 As New Label
- Dim Label2 As New Label
- Dim sbrGridX As New ScrollBar
- Dim sbrGridY As New ScrollBar
- Dim Label3 As New Label
- Dim lblMenuBar As New Label
- Dim Label7 As New Label
- Dim Label8 As New Label
- Dim lblParent As New Label
- Dim Label10 As New Label
- Dim lblFont As New Label
- Dim Label12 As New Label
- Dim Label4 As New Label
- Dim Label6 As New Label
- Dim lblLeft As New Label
- Dim Label11 As New Label
- Dim Label13 As New Label
- Dim Label14 As New Label
- Dim lblTop As New Label
- Dim lblWidth As New Label
- Dim lblHeight As New Label
- Dim Label18 As New Label
- Dim Label19 As New Label
- Dim Label20 As New Label
- Dim Label21 As New Label
- Dim Label22 As New Label
- Dim lblScaleLeft As New Label
- Dim lblScaleTop As New Label
- Dim lblScaleWidth As New Label
- Dim lblScaleHeight As New Label
- Dim optScaleMode0 As New OptionButton
- Dim optScaleMode1 As New OptionButton
- Dim optScaleMode2 As New OptionButton
- Dim optScaleMode3 As New OptionButton
- Dim optScaleMode4 As New OptionButton
- Dim optScaleMode5 As New OptionButton
- Dim optScaleMode6 As New OptionButton
- Dim optScaleMode7 As New OptionButton
- Dim optScaleMode8 As New OptionButton
- Dim FormFont As New Font
- Dim lblGridX As New Label
- Dim lblGridY As New Label
-
- ' METHODS for object: FormMasterForm
- Sub chkGridOn_Click()
- If chkGridOn.Value = 0 Then
- FormEditor.Editing = "False"
- FormEditor.GridOn = "False"
- Else
- FormEditor.Editing = "True"
- FormEditor.GridOn = "True"
- InfoBox.Message("", "Grid will automatically be turned off" & Chr(13) & Chr(10) & "when you click the OK button.")
- chkGridOn.Value = 0
- End If
- End Sub
-
- Sub chkShowOrder_Click()
- If chkShowOrder.Value = 0 Then
- FormEditor.Editing = "False"
- FormEditor.ShowOrder = "False"
- Else
- FormEditor.Editing = "True"
- FormEditor.ShowOrder = "True"
- InfoBox.Message("", "Object creation order will automatically be " & Chr(13) & Chr(10) & "turned off when you click the OK button. ")
- chkShowOrder.Value = 0
- End If
- End Sub
-
- Sub optScaleMode0_Click()
- ScaleMode = 0
- UpdateSizeProperties
- End Sub
-
- Sub optScaleMode1_Click()
- ScaleMode = 1
- UpdateSizeProperties
- End Sub
-
- Sub optScaleMode2_Click()
- ScaleMode = 2
- UpdateSizeProperties
- End Sub
-
- Sub optScaleMode3_Click()
- ScaleMode = 3
- UpdateSizeProperties
- End Sub
-
- Sub optScaleMode4_Click()
- ScaleMode = 4
- UpdateSizeProperties
- End Sub
-
- Sub optScaleMode5_Click()
- ScaleMode = 5
- UpdateSizeProperties
- End Sub
-
- Sub optScaleMode6_Click()
- ScaleMode = 6
- UpdateSizeProperties
- End Sub
-
- Sub optScaleMode7_Click()
- ScaleMode = 7
- UpdateSizeProperties
- End Sub
-
- Sub optScaleMode8_Click()
- ScaleMode = 8
- UpdateSizeProperties
- End Sub
-
- Sub ResetApplication_Click ()
-
- ' Set the right font
- FormFont.FaceName = "Arial"
- FormFont.Bold = True
- FormFont.Italic = False
- FormFont.Size = 9
-
- ' Set initial form size properties
- Width = 7920
- Height = 6990
- ScaleMode = 1
-
- ' Initialize the form size properties
- UpdateSizeProperties
-
- ' Update the Form References
- lblMenuBar.Caption = MenuBar
- lblParent.Caption = Parent
- lblFont.Caption = Font
-
- ' Set the correct option button
- optScaleMode0.Value = False
- optScaleMode1.Value = False
- optScaleMode2.Value = False
- optScaleMode3.Value = False
- optScaleMode4.Value = False
- optScaleMode5.Value = False
- optScaleMode6.Value = False
- optScaleMode7.Value = False
- optScaleMode8.Value = False
- Select Case ScaleMode
- Case 0
- optScaleMode0.Value = True
- Case 1
- optScaleMode1.Value = True
- Case 2
- optScaleMode2.Value = True
- Case 3
- optScaleMode3.Value = True
- Case 4
- optScaleMode4.Value = True
- Case 5
- optScaleMode5.Value = True
- Case 6
- optScaleMode6.Value = True
- Case 7
- optScaleMode7.Value = True
- Case 8
- optScaleMode8.Value = True
- End Select
-
- ' Initialize the checkboxes for ObjectEditor/FormEditor
- chkGridOn.Value = 0
- chkShowOrder.Value = 0
-
- ' Initialize the grid x/y units
- lblGridX.Text = FormEditor.GridX
- lblGridY.Text = FormEditor.GridY
-
- ' Set the current form for editing
- FormEditor.CurForm = FormMasterForm
- FormEditor.Editing = "False"
-
- ' Initialize the Scrollbar values
- ' Initialize the ScrollBar start positions
- sbrGridX.Value = 10
- sbrGridY.Value = 10
-
- ' Initialize the ScrollBar ranges
- sbrGridX.Min = 1
- sbrGridX.Max = 100
- sbrGridY.Min = 1
- sbrGridY.Max = 100
-
- ' Initialize the ScrollBar increments
- sbrGridX.SmallChange = 1
- sbrGridX.LargeChange = 1
- sbrGridY.SmallChange = 1
- sbrGridY.LargeChange = 1
-
- End Sub
-
- Sub Resize()
- UpdateSizeProperties
- End Sub
-
- Sub sbrGridX_Change()
- FormEditor.GridX = sbrGridX.Value
- lblGridX.Caption = FormEditor.GridX
- chkGridOn.SetFocus() ' sbrGridX.Refresh
- End Sub
-
- Sub sbrGridY_Change()
- FormEditor.GridY = sbrGridY.Value
- lblGridY.Caption = FormEditor.GridY
- chkGridOn.SetFocus() ' sbrGridY.Refresh
- End Sub
-
- Sub UpdateSizeProperties()
- lblLeft.Caption = Left
- lblTop.Caption = Top
- lblWidth.Caption = Width
- lblHeight.Caption = Height
- lblScaleLeft.Caption = ScaleLeft
- lblScaleTop.Caption = ScaleTop
- lblScaleWidth.Caption = ScaleWidth
- lblScaleHeight.Caption = ScaleHeight
- End Sub
-
- End Type
-
- Begin Code
- ' Reconstruction commands for object: FormMasterForm
- '
- With FormMasterForm
- .Caption := "Form Demonstration"
- .Font := FormMasterForm.FormFont
- .Move(3555, 1860, 7920, 6990)
- .SampleDir := "W:\bootcamp\basic\form\"
- .SampleName := "form"
- With .chkGridOn
- .Caption := "Grid On/Off"
- .ZOrder := 1
- .Move(4050, 750, 1800, 300)
- .TabGroup := True
- End With 'FormMasterForm.chkGridOn
- With .chkShowOrder
- .Caption := "Show Order"
- .ZOrder := 2
- .Move(4050, 1050, 1800, 300)
- End With 'FormMasterForm.chkShowOrder
- With .Label1
- .Caption := "Grid X coord:"
- .ZOrder := 3
- .Move(4050, 1650, 1350, 300)
- End With 'FormMasterForm.Label1
- With .Label2
- .Caption := "Grid Y coord:"
- .ZOrder := 4
- .Move(4050, 2250, 1350, 300)
- End With 'FormMasterForm.Label2
- With .sbrGridX
- .Caption := "sbrGridX"
- .ZOrder := 5
- .Move(6300, 1650, 300, 450)
- .SmallChange := 1
- .LargeChange := 1
- .Min := 1
- .Max := 100
- .Value := 1
- End With 'FormMasterForm.sbrGridX
- With .sbrGridY
- .Caption := "sbrGridY"
- .ZOrder := 6
- .Move(6300, 2250, 300, 450)
- .SmallChange := 1
- .LargeChange := 1
- .Min := 1
- .Max := 100
- .Value := 1
- End With 'FormMasterForm.sbrGridY
- With .Label3
- .Caption := "MenuBar:"
- .ZOrder := 7
- .Move(3900, 3750, 885, 300)
- .Alignment := "Right"
- End With 'FormMasterForm.Label3
- With .lblMenuBar
- .Caption := "SampleMasterFormMenuBar"
- .ForeColor := 255
- .ZOrder := 8
- .Move(4935, 3750, 2715, 300)
- End With 'FormMasterForm.lblMenuBar
- With .Label7
- .Caption := "References..."
- .ForeColor := 13107200
- .ZOrder := 9
- .Move(3750, 3300, 1350, 300)
- End With 'FormMasterForm.Label7
- With .Label8
- .Caption := "Parent:"
- .ZOrder := 10
- .Move(3900, 4050, 885, 300)
- .Alignment := "Right"
- End With 'FormMasterForm.Label8
- With .lblParent
- .Caption := "EnvelopForm"
- .ForeColor := 255
- .ZOrder := 11
- .Move(4935, 4050, 2715, 300)
- End With 'FormMasterForm.lblParent
- With .Label10
- .Caption := "Font:"
- .ZOrder := 12
- .Move(3900, 4350, 885, 300)
- .Alignment := "Right"
- End With 'FormMasterForm.Label10
- With .lblFont
- .Caption := "FormMasterForm.FormFont"
- .ForeColor := 255
- .ZOrder := 13
- .Move(4935, 4350, 2715, 300)
- End With 'FormMasterForm.lblFont
- With .Label12
- .Caption := "Editing Properties..."
- .ForeColor := 13107200
- .ZOrder := 14
- .Move(3750, 300, 1950, 300)
- End With 'FormMasterForm.Label12
- With .Label4
- .Caption := "Properties..."
- .ForeColor := 13107200
- .ZOrder := 15
- .Move(450, 300, 1650, 300)
- End With 'FormMasterForm.Label4
- With .Label6
- .Caption := "Left:"
- .ZOrder := 16
- .Move(300, 750, 1335, 300)
- .Alignment := "Right"
- End With 'FormMasterForm.Label6
- With .lblLeft
- .Caption := "3555"
- .ForeColor := 255
- .ZOrder := 17
- .Move(1800, 750, 1350, 300)
- End With 'FormMasterForm.lblLeft
- With .Label11
- .Caption := "Top:"
- .ZOrder := 18
- .Move(300, 1050, 1335, 300)
- .Alignment := "Right"
- End With 'FormMasterForm.Label11
- With .Label13
- .Caption := "Width:"
- .ZOrder := 19
- .Move(300, 1350, 1335, 300)
- .Alignment := "Right"
- End With 'FormMasterForm.Label13
- With .Label14
- .Caption := "Height:"
- .ZOrder := 20
- .Move(300, 1650, 1335, 300)
- .Alignment := "Right"
- End With 'FormMasterForm.Label14
- With .lblTop
- .Caption := "1860"
- .ForeColor := 255
- .ZOrder := 21
- .Move(1800, 1050, 1350, 300)
- End With 'FormMasterForm.lblTop
- With .lblWidth
- .Caption := "7920"
- .ForeColor := 255
- .ZOrder := 22
- .Move(1800, 1350, 1350, 300)
- End With 'FormMasterForm.lblWidth
- With .lblHeight
- .Caption := "6990"
- .ForeColor := 255
- .ZOrder := 23
- .Move(1800, 1650, 1350, 300)
- End With 'FormMasterForm.lblHeight
- With .Label18
- .Caption := "Scale Left:"
- .ZOrder := 24
- .Move(300, 1950, 1335, 300)
- .Alignment := "Right"
- End With 'FormMasterForm.Label18
- With .Label19
- .Caption := "Scale Top:"
- .ZOrder := 25
- .Move(300, 2250, 1335, 300)
- .Alignment := "Right"
- End With 'FormMasterForm.Label19
- With .Label20
- .Caption := "Scale Width:"
- .ZOrder := 26
- .Move(300, 2550, 1335, 300)
- .Alignment := "Right"
- End With 'FormMasterForm.Label20
- With .Label21
- .Caption := "Scale Height:"
- .ZOrder := 27
- .Move(300, 2850, 1335, 300)
- .Alignment := "Right"
- End With 'FormMasterForm.Label21
- With .Label22
- .Caption := "Scale Mode:"
- .ZOrder := 28
- .Move(300, 3300, 1350, 300)
- End With 'FormMasterForm.Label22
- With .lblScaleLeft
- .Caption := "0"
- .ForeColor := 255
- .ZOrder := 29
- .Move(1800, 1950, 1350, 300)
- End With 'FormMasterForm.lblScaleLeft
- With .lblScaleTop
- .Caption := "0"
- .ForeColor := 255
- .ZOrder := 30
- .Move(1800, 2250, 1350, 300)
- End With 'FormMasterForm.lblScaleTop
- With .lblScaleWidth
- .Caption := "7800"
- .ForeColor := 255
- .ZOrder := 31
- .Move(1800, 2550, 1350, 300)
- End With 'FormMasterForm.lblScaleWidth
- With .lblScaleHeight
- .Caption := "6300"
- .ForeColor := 255
- .ZOrder := 32
- .Move(1800, 2850, 1350, 300)
- End With 'FormMasterForm.lblScaleHeight
- With .optScaleMode0
- .Caption := "0 - Custom"
- .ZOrder := 33
- .Move(1800, 3300, 1785, 300)
- .TabGroup := True
- End With 'FormMasterForm.optScaleMode0
- With .optScaleMode1
- .Caption := "1 - Twips"
- .ZOrder := 34
- .Move(1800, 3600, 1785, 300)
- .TabStop := True
- End With 'FormMasterForm.optScaleMode1
- With .optScaleMode2
- .Caption := "2 - Point"
- .ZOrder := 35
- .Move(1800, 3900, 1785, 300)
- End With 'FormMasterForm.optScaleMode2
- With .optScaleMode3
- .Caption := "3 - Pixel"
- .ZOrder := 36
- .Move(1800, 4200, 1785, 300)
- End With 'FormMasterForm.optScaleMode3
- With .optScaleMode4
- .Caption := "4 - Character"
- .ZOrder := 37
- .Move(1800, 4500, 1785, 300)
- End With 'FormMasterForm.optScaleMode4
- With .optScaleMode5
- .Caption := "5 - Inch"
- .ZOrder := 38
- .Move(1800, 4800, 1785, 300)
- End With 'FormMasterForm.optScaleMode5
- With .optScaleMode6
- .Caption := "6 - Millimeter"
- .ZOrder := 39
- .Move(1800, 5100, 1785, 300)
- End With 'FormMasterForm.optScaleMode6
- With .optScaleMode7
- .Caption := "7 - Centimeter"
- .ZOrder := 40
- .Move(1800, 5400, 1785, 300)
- End With 'FormMasterForm.optScaleMode7
- With .optScaleMode8
- .Caption := "8 - Proportional"
- .ZOrder := 41
- .Move(1800, 5700, 1785, 300)
- End With 'FormMasterForm.optScaleMode8
- With .FormFont
- .FaceName := "Arial"
- .Size := 9.000000
- .Bold := True
- .Italic := False
- .Strikethru := False
- End With 'FormMasterForm.FormFont
- With .lblGridX
- .Caption := "10"
- .BackColor := 16711680
- .ForeColor := 16777215
- .Font := FormMasterForm.FormFont
- .ZOrder := 42
- .Move(5550, 1650, 600, 450)
- .BorderStyle := "Fixed Single"
- .Alignment := "Center"
- End With 'FormMasterForm.lblGridX
- With .lblGridY
- .Caption := "10"
- .BackColor := 16711680
- .ForeColor := 16777215
- .Font := FormMasterForm.FormFont
- .ZOrder := 43
- .Move(5550, 2250, 600, 450)
- .BorderStyle := "Fixed Single"
- .Alignment := "Center"
- End With 'FormMasterForm.lblGridY
- With .helpfile
- .FileName := "W:\bootcamp\basic\form\form.hlp"
- End With 'FormMasterForm.helpfile
- End With 'FormMasterForm
- End Code
-