home *** CD-ROM | disk | FTP | other *** search
/ The Best of Select: Windows 95 Special 2 / WIN95_2.bin / utils / envelop / envelop.6 / Tools / Bootcamp / basic / form / form.eto < prev    next >
Encoding:
Text File  |  1996-07-08  |  13.9 KB  |  513 lines

  1. Type FormMasterForm From SampleMasterForm
  2.   Dim chkGridOn As New CheckBox
  3.   Dim chkShowOrder As New CheckBox
  4.   Dim Label1 As New Label
  5.   Dim Label2 As New Label
  6.   Dim sbrGridX As New ScrollBar
  7.   Dim sbrGridY As New ScrollBar
  8.   Dim Label3 As New Label
  9.   Dim lblMenuBar As New Label
  10.   Dim Label7 As New Label
  11.   Dim Label8 As New Label
  12.   Dim lblParent As New Label
  13.   Dim Label10 As New Label
  14.   Dim lblFont As New Label
  15.   Dim Label12 As New Label
  16.   Dim Label4 As New Label
  17.   Dim Label6 As New Label
  18.   Dim lblLeft As New Label
  19.   Dim Label11 As New Label
  20.   Dim Label13 As New Label
  21.   Dim Label14 As New Label
  22.   Dim lblTop As New Label
  23.   Dim lblWidth As New Label
  24.   Dim lblHeight As New Label
  25.   Dim Label18 As New Label
  26.   Dim Label19 As New Label
  27.   Dim Label20 As New Label
  28.   Dim Label21 As New Label
  29.   Dim Label22 As New Label
  30.   Dim lblScaleLeft As New Label
  31.   Dim lblScaleTop As New Label
  32.   Dim lblScaleWidth As New Label
  33.   Dim lblScaleHeight As New Label
  34.   Dim optScaleMode0 As New OptionButton
  35.   Dim optScaleMode1 As New OptionButton
  36.   Dim optScaleMode2 As New OptionButton
  37.   Dim optScaleMode3 As New OptionButton
  38.   Dim optScaleMode4 As New OptionButton
  39.   Dim optScaleMode5 As New OptionButton
  40.   Dim optScaleMode6 As New OptionButton
  41.   Dim optScaleMode7 As New OptionButton
  42.   Dim optScaleMode8 As New OptionButton
  43.   Dim FormFont As New Font
  44.   Dim lblGridX As New Label
  45.   Dim lblGridY As New Label
  46.  
  47.   ' METHODS for object: FormMasterForm
  48.   Sub chkGridOn_Click()
  49.     If chkGridOn.Value = 0 Then 
  50.       FormEditor.Editing = "False"
  51.       FormEditor.GridOn = "False"
  52.     Else 
  53.       FormEditor.Editing = "True"
  54.       FormEditor.GridOn = "True"
  55.       InfoBox.Message("", "Grid will automatically be turned off" & Chr(13) & Chr(10) & "when you click the OK button.")
  56.       chkGridOn.Value = 0
  57.     End If
  58.   End Sub
  59.  
  60.   Sub chkShowOrder_Click()
  61.     If chkShowOrder.Value = 0 Then 
  62.       FormEditor.Editing = "False"
  63.       FormEditor.ShowOrder = "False"
  64.     Else 
  65.       FormEditor.Editing = "True"
  66.       FormEditor.ShowOrder = "True"
  67.       InfoBox.Message("", "Object creation order will automatically be " & Chr(13) & Chr(10) & "turned off when you click the OK button. ")
  68.       chkShowOrder.Value = 0
  69.     End If
  70.   End Sub
  71.  
  72.   Sub optScaleMode0_Click()
  73.     ScaleMode = 0
  74.     UpdateSizeProperties
  75.   End Sub
  76.  
  77.   Sub optScaleMode1_Click()
  78.     ScaleMode = 1
  79.     UpdateSizeProperties
  80.   End Sub
  81.  
  82.   Sub optScaleMode2_Click()
  83.     ScaleMode = 2
  84.     UpdateSizeProperties
  85.   End Sub
  86.  
  87.   Sub optScaleMode3_Click()
  88.     ScaleMode = 3
  89.     UpdateSizeProperties
  90.   End Sub
  91.  
  92.   Sub optScaleMode4_Click()
  93.     ScaleMode = 4
  94.     UpdateSizeProperties
  95.   End Sub
  96.  
  97.   Sub optScaleMode5_Click()
  98.     ScaleMode = 5
  99.     UpdateSizeProperties
  100.   End Sub
  101.  
  102.   Sub optScaleMode6_Click()
  103.     ScaleMode = 6
  104.     UpdateSizeProperties
  105.   End Sub
  106.  
  107.   Sub optScaleMode7_Click()
  108.     ScaleMode = 7
  109.     UpdateSizeProperties
  110.   End Sub
  111.  
  112.   Sub optScaleMode8_Click()
  113.     ScaleMode = 8
  114.     UpdateSizeProperties
  115.   End Sub
  116.  
  117.   Sub ResetApplication_Click ()
  118.   
  119.     ' Set the right font
  120.     FormFont.FaceName = "Arial"
  121.     FormFont.Bold = True
  122.     FormFont.Italic = False
  123.     FormFont.Size = 9
  124.   
  125.     ' Set initial form size properties
  126.     Width = 7920
  127.     Height = 6990
  128.     ScaleMode = 1
  129.   
  130.     ' Initialize the form size properties
  131.     UpdateSizeProperties
  132.   
  133.     ' Update the Form References
  134.     lblMenuBar.Caption = MenuBar
  135.     lblParent.Caption = Parent
  136.     lblFont.Caption = Font
  137.   
  138.     ' Set the correct option button
  139.     optScaleMode0.Value = False
  140.     optScaleMode1.Value = False
  141.     optScaleMode2.Value = False
  142.     optScaleMode3.Value = False
  143.     optScaleMode4.Value = False
  144.     optScaleMode5.Value = False
  145.     optScaleMode6.Value = False
  146.     optScaleMode7.Value = False
  147.     optScaleMode8.Value = False
  148.     Select Case ScaleMode
  149.       Case 0
  150.         optScaleMode0.Value = True
  151.       Case 1
  152.         optScaleMode1.Value = True
  153.       Case 2
  154.         optScaleMode2.Value = True
  155.       Case 3
  156.         optScaleMode3.Value = True
  157.       Case 4
  158.         optScaleMode4.Value = True
  159.       Case 5
  160.         optScaleMode5.Value = True
  161.       Case 6
  162.         optScaleMode6.Value = True
  163.       Case 7
  164.         optScaleMode7.Value = True
  165.       Case 8
  166.         optScaleMode8.Value = True
  167.     End Select
  168.   
  169.     ' Initialize the checkboxes for ObjectEditor/FormEditor
  170.     chkGridOn.Value = 0
  171.     chkShowOrder.Value = 0
  172.   
  173.     ' Initialize the grid x/y units
  174.     lblGridX.Text = FormEditor.GridX
  175.     lblGridY.Text = FormEditor.GridY
  176.   
  177.     ' Set the current form for editing
  178.     FormEditor.CurForm = FormMasterForm
  179.     FormEditor.Editing = "False"
  180.   
  181.     ' Initialize the Scrollbar values
  182.     ' Initialize the ScrollBar start positions
  183.     sbrGridX.Value = 10
  184.     sbrGridY.Value = 10
  185.   
  186.     ' Initialize the ScrollBar ranges
  187.     sbrGridX.Min = 1
  188.     sbrGridX.Max = 100
  189.     sbrGridY.Min = 1
  190.     sbrGridY.Max = 100
  191.   
  192.     ' Initialize the ScrollBar increments
  193.     sbrGridX.SmallChange = 1
  194.     sbrGridX.LargeChange = 1
  195.     sbrGridY.SmallChange = 1
  196.     sbrGridY.LargeChange = 1
  197.   
  198.   End Sub
  199.  
  200.   Sub Resize()
  201.     UpdateSizeProperties
  202.   End Sub
  203.  
  204.   Sub sbrGridX_Change()
  205.     FormEditor.GridX = sbrGridX.Value
  206.     lblGridX.Caption = FormEditor.GridX
  207.     chkGridOn.SetFocus() ' sbrGridX.Refresh
  208.   End Sub
  209.  
  210.   Sub sbrGridY_Change()
  211.     FormEditor.GridY = sbrGridY.Value
  212.     lblGridY.Caption = FormEditor.GridY
  213.     chkGridOn.SetFocus() ' sbrGridY.Refresh
  214.   End Sub
  215.  
  216.   Sub UpdateSizeProperties()
  217.     lblLeft.Caption = Left
  218.     lblTop.Caption = Top
  219.     lblWidth.Caption = Width
  220.     lblHeight.Caption = Height
  221.     lblScaleLeft.Caption = ScaleLeft
  222.     lblScaleTop.Caption = ScaleTop
  223.     lblScaleWidth.Caption = ScaleWidth
  224.     lblScaleHeight.Caption = ScaleHeight
  225.   End Sub
  226.  
  227. End Type
  228.  
  229. Begin Code
  230. ' Reconstruction commands for object: FormMasterForm
  231. '
  232.   With FormMasterForm
  233.     .Caption := "Form Demonstration"
  234.     .Font := FormMasterForm.FormFont
  235.     .Move(3555, 1860, 7920, 6990)
  236.     .SampleDir := "W:\bootcamp\basic\form\"
  237.     .SampleName := "form"
  238.     With .chkGridOn
  239.       .Caption := "Grid On/Off"
  240.       .ZOrder := 1
  241.       .Move(4050, 750, 1800, 300)
  242.       .TabGroup := True
  243.     End With  'FormMasterForm.chkGridOn
  244.     With .chkShowOrder
  245.       .Caption := "Show Order"
  246.       .ZOrder := 2
  247.       .Move(4050, 1050, 1800, 300)
  248.     End With  'FormMasterForm.chkShowOrder
  249.     With .Label1
  250.       .Caption := "Grid X coord:"
  251.       .ZOrder := 3
  252.       .Move(4050, 1650, 1350, 300)
  253.     End With  'FormMasterForm.Label1
  254.     With .Label2
  255.       .Caption := "Grid Y coord:"
  256.       .ZOrder := 4
  257.       .Move(4050, 2250, 1350, 300)
  258.     End With  'FormMasterForm.Label2
  259.     With .sbrGridX
  260.       .Caption := "sbrGridX"
  261.       .ZOrder := 5
  262.       .Move(6300, 1650, 300, 450)
  263.       .SmallChange := 1
  264.       .LargeChange := 1
  265.       .Min := 1
  266.       .Max := 100
  267.       .Value := 1
  268.     End With  'FormMasterForm.sbrGridX
  269.     With .sbrGridY
  270.       .Caption := "sbrGridY"
  271.       .ZOrder := 6
  272.       .Move(6300, 2250, 300, 450)
  273.       .SmallChange := 1
  274.       .LargeChange := 1
  275.       .Min := 1
  276.       .Max := 100
  277.       .Value := 1
  278.     End With  'FormMasterForm.sbrGridY
  279.     With .Label3
  280.       .Caption := "MenuBar:"
  281.       .ZOrder := 7
  282.       .Move(3900, 3750, 885, 300)
  283.       .Alignment := "Right"
  284.     End With  'FormMasterForm.Label3
  285.     With .lblMenuBar
  286.       .Caption := "SampleMasterFormMenuBar"
  287.       .ForeColor := 255
  288.       .ZOrder := 8
  289.       .Move(4935, 3750, 2715, 300)
  290.     End With  'FormMasterForm.lblMenuBar
  291.     With .Label7
  292.       .Caption := "References..."
  293.       .ForeColor := 13107200
  294.       .ZOrder := 9
  295.       .Move(3750, 3300, 1350, 300)
  296.     End With  'FormMasterForm.Label7
  297.     With .Label8
  298.       .Caption := "Parent:"
  299.       .ZOrder := 10
  300.       .Move(3900, 4050, 885, 300)
  301.       .Alignment := "Right"
  302.     End With  'FormMasterForm.Label8
  303.     With .lblParent
  304.       .Caption := "EnvelopForm"
  305.       .ForeColor := 255
  306.       .ZOrder := 11
  307.       .Move(4935, 4050, 2715, 300)
  308.     End With  'FormMasterForm.lblParent
  309.     With .Label10
  310.       .Caption := "Font:"
  311.       .ZOrder := 12
  312.       .Move(3900, 4350, 885, 300)
  313.       .Alignment := "Right"
  314.     End With  'FormMasterForm.Label10
  315.     With .lblFont
  316.       .Caption := "FormMasterForm.FormFont"
  317.       .ForeColor := 255
  318.       .ZOrder := 13
  319.       .Move(4935, 4350, 2715, 300)
  320.     End With  'FormMasterForm.lblFont
  321.     With .Label12
  322.       .Caption := "Editing Properties..."
  323.       .ForeColor := 13107200
  324.       .ZOrder := 14
  325.       .Move(3750, 300, 1950, 300)
  326.     End With  'FormMasterForm.Label12
  327.     With .Label4
  328.       .Caption := "Properties..."
  329.       .ForeColor := 13107200
  330.       .ZOrder := 15
  331.       .Move(450, 300, 1650, 300)
  332.     End With  'FormMasterForm.Label4
  333.     With .Label6
  334.       .Caption := "Left:"
  335.       .ZOrder := 16
  336.       .Move(300, 750, 1335, 300)
  337.       .Alignment := "Right"
  338.     End With  'FormMasterForm.Label6
  339.     With .lblLeft
  340.       .Caption := "3555"
  341.       .ForeColor := 255
  342.       .ZOrder := 17
  343.       .Move(1800, 750, 1350, 300)
  344.     End With  'FormMasterForm.lblLeft
  345.     With .Label11
  346.       .Caption := "Top:"
  347.       .ZOrder := 18
  348.       .Move(300, 1050, 1335, 300)
  349.       .Alignment := "Right"
  350.     End With  'FormMasterForm.Label11
  351.     With .Label13
  352.       .Caption := "Width:"
  353.       .ZOrder := 19
  354.       .Move(300, 1350, 1335, 300)
  355.       .Alignment := "Right"
  356.     End With  'FormMasterForm.Label13
  357.     With .Label14
  358.       .Caption := "Height:"
  359.       .ZOrder := 20
  360.       .Move(300, 1650, 1335, 300)
  361.       .Alignment := "Right"
  362.     End With  'FormMasterForm.Label14
  363.     With .lblTop
  364.       .Caption := "1860"
  365.       .ForeColor := 255
  366.       .ZOrder := 21
  367.       .Move(1800, 1050, 1350, 300)
  368.     End With  'FormMasterForm.lblTop
  369.     With .lblWidth
  370.       .Caption := "7920"
  371.       .ForeColor := 255
  372.       .ZOrder := 22
  373.       .Move(1800, 1350, 1350, 300)
  374.     End With  'FormMasterForm.lblWidth
  375.     With .lblHeight
  376.       .Caption := "6990"
  377.       .ForeColor := 255
  378.       .ZOrder := 23
  379.       .Move(1800, 1650, 1350, 300)
  380.     End With  'FormMasterForm.lblHeight
  381.     With .Label18
  382.       .Caption := "Scale Left:"
  383.       .ZOrder := 24
  384.       .Move(300, 1950, 1335, 300)
  385.       .Alignment := "Right"
  386.     End With  'FormMasterForm.Label18
  387.     With .Label19
  388.       .Caption := "Scale Top:"
  389.       .ZOrder := 25
  390.       .Move(300, 2250, 1335, 300)
  391.       .Alignment := "Right"
  392.     End With  'FormMasterForm.Label19
  393.     With .Label20
  394.       .Caption := "Scale Width:"
  395.       .ZOrder := 26
  396.       .Move(300, 2550, 1335, 300)
  397.       .Alignment := "Right"
  398.     End With  'FormMasterForm.Label20
  399.     With .Label21
  400.       .Caption := "Scale Height:"
  401.       .ZOrder := 27
  402.       .Move(300, 2850, 1335, 300)
  403.       .Alignment := "Right"
  404.     End With  'FormMasterForm.Label21
  405.     With .Label22
  406.       .Caption := "Scale Mode:"
  407.       .ZOrder := 28
  408.       .Move(300, 3300, 1350, 300)
  409.     End With  'FormMasterForm.Label22
  410.     With .lblScaleLeft
  411.       .Caption := "0"
  412.       .ForeColor := 255
  413.       .ZOrder := 29
  414.       .Move(1800, 1950, 1350, 300)
  415.     End With  'FormMasterForm.lblScaleLeft
  416.     With .lblScaleTop
  417.       .Caption := "0"
  418.       .ForeColor := 255
  419.       .ZOrder := 30
  420.       .Move(1800, 2250, 1350, 300)
  421.     End With  'FormMasterForm.lblScaleTop
  422.     With .lblScaleWidth
  423.       .Caption := "7800"
  424.       .ForeColor := 255
  425.       .ZOrder := 31
  426.       .Move(1800, 2550, 1350, 300)
  427.     End With  'FormMasterForm.lblScaleWidth
  428.     With .lblScaleHeight
  429.       .Caption := "6300"
  430.       .ForeColor := 255
  431.       .ZOrder := 32
  432.       .Move(1800, 2850, 1350, 300)
  433.     End With  'FormMasterForm.lblScaleHeight
  434.     With .optScaleMode0
  435.       .Caption := "0 - Custom"
  436.       .ZOrder := 33
  437.       .Move(1800, 3300, 1785, 300)
  438.       .TabGroup := True
  439.     End With  'FormMasterForm.optScaleMode0
  440.     With .optScaleMode1
  441.       .Caption := "1 - Twips"
  442.       .ZOrder := 34
  443.       .Move(1800, 3600, 1785, 300)
  444.       .TabStop := True
  445.     End With  'FormMasterForm.optScaleMode1
  446.     With .optScaleMode2
  447.       .Caption := "2 - Point"
  448.       .ZOrder := 35
  449.       .Move(1800, 3900, 1785, 300)
  450.     End With  'FormMasterForm.optScaleMode2
  451.     With .optScaleMode3
  452.       .Caption := "3 - Pixel"
  453.       .ZOrder := 36
  454.       .Move(1800, 4200, 1785, 300)
  455.     End With  'FormMasterForm.optScaleMode3
  456.     With .optScaleMode4
  457.       .Caption := "4 - Character"
  458.       .ZOrder := 37
  459.       .Move(1800, 4500, 1785, 300)
  460.     End With  'FormMasterForm.optScaleMode4
  461.     With .optScaleMode5
  462.       .Caption := "5 - Inch"
  463.       .ZOrder := 38
  464.       .Move(1800, 4800, 1785, 300)
  465.     End With  'FormMasterForm.optScaleMode5
  466.     With .optScaleMode6
  467.       .Caption := "6 - Millimeter"
  468.       .ZOrder := 39
  469.       .Move(1800, 5100, 1785, 300)
  470.     End With  'FormMasterForm.optScaleMode6
  471.     With .optScaleMode7
  472.       .Caption := "7 - Centimeter"
  473.       .ZOrder := 40
  474.       .Move(1800, 5400, 1785, 300)
  475.     End With  'FormMasterForm.optScaleMode7
  476.     With .optScaleMode8
  477.       .Caption := "8 - Proportional"
  478.       .ZOrder := 41
  479.       .Move(1800, 5700, 1785, 300)
  480.     End With  'FormMasterForm.optScaleMode8
  481.     With .FormFont
  482.       .FaceName := "Arial"
  483.       .Size := 9.000000
  484.       .Bold := True
  485.       .Italic := False
  486.       .Strikethru := False
  487.     End With  'FormMasterForm.FormFont
  488.     With .lblGridX
  489.       .Caption := "10"
  490.       .BackColor := 16711680
  491.       .ForeColor := 16777215
  492.       .Font := FormMasterForm.FormFont
  493.       .ZOrder := 42
  494.       .Move(5550, 1650, 600, 450)
  495.       .BorderStyle := "Fixed Single"
  496.       .Alignment := "Center"
  497.     End With  'FormMasterForm.lblGridX
  498.     With .lblGridY
  499.       .Caption := "10"
  500.       .BackColor := 16711680
  501.       .ForeColor := 16777215
  502.       .Font := FormMasterForm.FormFont
  503.       .ZOrder := 43
  504.       .Move(5550, 2250, 600, 450)
  505.       .BorderStyle := "Fixed Single"
  506.       .Alignment := "Center"
  507.     End With  'FormMasterForm.lblGridY
  508.     With .helpfile
  509.       .FileName := "W:\bootcamp\basic\form\form.hlp"
  510.     End With  'FormMasterForm.helpfile
  511.   End With  'FormMasterForm
  512. End Code
  513.