VERSION 5.00
Object = "{F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.2#0"; "COMDLG32.OCX"
Begin VB.Form Form1 
   Caption         =   "Form1"
   ClientHeight    =   2250
   ClientLeft      =   165
   ClientTop       =   735
   ClientWidth     =   4680
   LinkTopic       =   "Form1"
   ScaleHeight     =   2250
   ScaleWidth      =   4680
   StartUpPosition =   3  '窗口缺省
   Begin VB.TextBox Text1 
      Height          =   2235
      Left            =   0
      MultiLine       =   -1  'True
      ScrollBars      =   3  'Both
      TabIndex        =   0
      Text            =   "sy08-06.frx":0000
      Top             =   0
      Width           =   4635
   End
   Begin MSComDlg.CommonDialog CommonDialog1 
      Left            =   360
      Top             =   2580
      _ExtentX        =   847
      _ExtentY        =   847
      _Version        =   393216
   End
   Begin VB.Menu menu1 
      Caption         =   "菜单1"
      Begin VB.Menu menu11 
         Caption         =   "清除"
      End
      Begin VB.Menu menu12 
         Caption         =   "结束"
      End
   End
   Begin VB.Menu menu2 
      Caption         =   "菜单2"
      Begin VB.Menu menu21 
         Caption         =   "12号字体"
      End
      Begin VB.Menu menu22 
         Caption         =   "16号字体"
      End
      Begin VB.Menu menu23 
         Caption         =   "粗体"
      End
      Begin VB.Menu menu24 
         Caption         =   "斜体"
      End
   End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Form_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
    If Button = 2 Then PopupMenu menu2
End Sub
Private Sub menu11_Click()
    Text1.Text = ""                               ' 清除文本框中的内容
  ' menu2.Visible = False
End Sub
Private Sub menu21_Click()
    Text1.FontSize = 12                           ' 设置字体大小
End Sub
Private Sub menu22_Click()
    Text1.FontSize = 16                           ' 设置字体大小
End Sub
Private Sub menu23_Click()
    menu23.Checked = Not menu23.Checked          ' 控制"√"标记显示与否
    Text1.FontBold = menu23.Checked               ' 粗体
End Sub
Private Sub menu24_Click()
    menu24.Checked = Not menu24.Checked
    Text1.FontItalic = Not Text1.FontItalic            ' 斜体，与粗体控制功能类似
End Sub

Private Sub Text1_Change()
    If Text1 = "" Then
    menu2.Visible = False
    Else
    menu2.Visible = True
    End If
End Sub
Private Sub Text1_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
    If Button = 2 Then PopupMenu menu2
End Sub
