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 / checkbox / checkbox.eto < prev    next >
Encoding:
Text File  |  1996-07-08  |  3.1 KB  |  112 lines

  1. Type CheckBoxMasterForm From SampleMasterForm
  2.   Dim FontWelcome As New Font
  3.   Dim lblWelcome As New Label
  4.   Dim chkBold As New CheckBox
  5.   Dim chkItalic As New CheckBox
  6.   Dim chkUnderline As New CheckBox
  7.   Dim chkStrikethru As New CheckBox
  8.  
  9.   ' METHODS for object: CheckBoxMasterForm
  10.   Sub chkBold_Click()
  11.     If chkBold.Value = 1 Then 
  12.       FontWelcome.Bold = "True"
  13.     Else 
  14.       FontWelcome.Bold = "False"
  15.     End If
  16.   End Sub
  17.  
  18.   Sub chkItalic_Click()
  19.     If chkItalic.Value = 1 Then 
  20.       FontWelcome.Italic = "True"
  21.     Else 
  22.       FontWelcome.Italic = "False"
  23.     End If
  24.   End Sub
  25.  
  26.   Sub chkStrikethru_Click()
  27.     If chkStrikethru.Value = 1 Then 
  28.       FontWelcome.Strikethru = "True"
  29.     Else 
  30.       FontWelcome.Strikethru = "False"
  31.     End If
  32.   End Sub
  33.  
  34.   Sub chkUnderline_Click()
  35.     If chkUnderline.Value = 1 Then 
  36.       FontWelcome.Underline = "True"
  37.     Else 
  38.       FontWelcome.Underline = "False"
  39.     End If
  40.   End Sub
  41.  
  42.   Sub ResetApplication_Click ()
  43.   
  44.     ' Setup checkbox defaults
  45.     chkBold.Value = 0
  46.     chkItalic.Value = 0
  47.     chkStrikethru.Value = 0
  48.     chkUnderline.Value = 0
  49.   
  50.     ' Setup Welcome label font defaults
  51.     FontWelcome.FaceName = "MS Sans Serif"
  52.     FontWelcome.Bold = "False"
  53.     FontWelcome.Italic = "False"
  54.     FontWelcome.Strikethru = "False"
  55.     FontWelcome.Underline = "False"
  56.   
  57.   End Sub
  58.  
  59. End Type
  60.  
  61. Begin Code
  62. ' Reconstruction commands for object: CheckBoxMasterForm
  63. '
  64.   With CheckBoxMasterForm
  65.     .Caption := "CheckBox Demonstration"
  66.     .Move(4650, 2160, 6420, 4125)
  67.     .SampleDir := "C:\ENVELOP\bootcamp\basic\checkbox\"
  68.     .SampleName := "checkbox"
  69.     With .FontWelcome
  70.       .FaceName := "MS Sans Serif"
  71.       .Size := 18.000000
  72.       .Bold := False
  73.       .Italic := False
  74.       .Strikethru := False
  75.     End With  'CheckBoxMasterForm.FontWelcome
  76.     With .lblWelcome
  77.       .Caption := "Welcome to the CheckBox Demonstration!"
  78.       .Font := CheckBoxMasterForm.FontWelcome
  79.       .ZOrder := 1
  80.       .Move(300, 300, 5700, 900)
  81.       .Alignment := "Center"
  82.     End With  'CheckBoxMasterForm.lblWelcome
  83.     With .chkBold
  84.       .Caption := "  1. Toggles font Bold property."
  85.       .ForeColor := 13107200
  86.       .ZOrder := 2
  87.       .Move(900, 1500, 3900, 300)
  88.     End With  'CheckBoxMasterForm.chkBold
  89.     With .chkItalic
  90.       .Caption := "  2. Toggles font Italic property."
  91.       .ForeColor := 13107200
  92.       .ZOrder := 3
  93.       .Move(900, 1950, 3900, 300)
  94.     End With  'CheckBoxMasterForm.chkItalic
  95.     With .chkUnderline
  96.       .Caption := "  3. Toggles font Underline property."
  97.       .ForeColor := 13107200
  98.       .ZOrder := 4
  99.       .Move(900, 2400, 3900, 300)
  100.     End With  'CheckBoxMasterForm.chkUnderline
  101.     With .chkStrikethru
  102.       .Caption := "  4. Toggles font Strikethru property."
  103.       .ForeColor := 13107200
  104.       .ZOrder := 5
  105.       .Move(900, 2850, 3900, 300)
  106.     End With  'CheckBoxMasterForm.chkStrikethru
  107.     With .helpfile
  108.       .FileName := "C:\ENVELOP\bootcamp\basic\checkbox\checkbox.hlp"
  109.     End With  'CheckBoxMasterForm.helpfile
  110.   End With  'CheckBoxMasterForm
  111. End Code
  112.