home *** CD-ROM | disk | FTP | other *** search
- VERSION 4.00
- Begin VB.Form frmCheck
- Caption = "Check Box Example"
- ClientHeight = 3480
- ClientLeft = 2145
- ClientTop = 1980
- ClientWidth = 4695
- BeginProperty Font
- name = "MS Sans Serif"
- charset = 1
- weight = 700
- size = 8.25
- underline = 0 'False
- italic = 0 'False
- strikethrough = 0 'False
- EndProperty
- Height = 3885
- Left = 2085
- LinkTopic = "Form4"
- ScaleHeight = 3480
- ScaleWidth = 4695
- Top = 1635
- Width = 4815
- Begin VB.CommandButton cmdClose
- Caption = "&Close"
- Height = 495
- Left = 3045
- TabIndex = 3
- Top = 2520
- Width = 1095
- End
- Begin VB.CheckBox chkItalic
- Caption = "&Italic"
- Height = 495
- Left = 600
- TabIndex = 2
- Top = 2640
- Width = 1215
- End
- Begin VB.CheckBox chkBold
- Caption = "&Bold"
- Height = 495
- Left = 600
- TabIndex = 1
- Top = 2160
- Width = 1215
- End
- Begin VB.TextBox txtDisplay
- BeginProperty Font
- name = "MS Sans Serif"
- charset = 1
- weight = 400
- size = 8.25
- underline = 0 'False
- italic = 0 'False
- strikethrough = 0 'False
- EndProperty
- Height = 975
- Left = 600
- MultiLine = -1 'True
- TabIndex = 0
- Top = 840
- Width = 3495
- End
- Begin VB.Label lblEnter
- Caption = "Enter your text here:"
- Height = 255
- Left = 600
- TabIndex = 4
- Top = 480
- Width = 2775
- End
- Attribute VB_Name = "frmCheck"
- Attribute VB_Creatable = False
- Attribute VB_Exposed = False
- Private Sub chkBold_Click()
- ' The Click event occurs when the check box changes state.
- ' Value property indicates the new state of the check box.
- Dim objF As Font
- Set objF = txtDisplay.Font
- If ChkBold.Value = vbChecked Then ' If checked.
- objF.Bold = True
- Else ' If not checked.
- objF.Bold = False
- End If
- End Sub
- Private Sub chkItalic_Click()
- ' The Click event occurs when the check box changes state.
- ' Value property indicates the new state of check box.
- Dim objF As Font
- Set objF = txtDisplay.Font
- If ChkItalic.Value = vbChecked Then ' If checked.
- objF.Italic = True
- Else ' If not checked.
- objF.Italic = False
- End If
- End Sub
- Private Sub cmdClose_Click()
- Unload Me ' Unload this form.
- End Sub
-