Private Sub Copy_Click()
Clipboard.SetText Text1.SelText
Paste.Enabled = True
End Sub
Private Sub Cut_Click()
Clipboard.SetText Text1.SelText
Text1.SelText = ""
End Sub
Private Sub Paste_Click()
Text1.SelText = Clipboard.GetText
End Sub
Private Sub Toolbar1_ButtonClick(ByVal Button As MSComCtlLib.Button)
On Error Resume Next
Select Case Button.Key
Case "新建"
new_Click '应做:添加 '新建' 按钮代码。
Case "保存"
save_Click
Case "复制"
Copy_Click
Case "剪切"
Cut_Click
Case "粘贴"
Paste_Click
Case "粗体"
Text1.FontBold = True '应做:添加 '粗体' 按钮代码。
vb语言代码大全网页 Case "斜体"
Text1.FontItalic = True '应做:添加 '斜体' 按钮代码。
Case "下划线"
Text1.FontUnderline = True '应做:添加 '下划线' 按钮代码。
End Select
End Sub
Private Sub BackColor_Click()
Cmd.Action = 3
Text1.BackColor = Cmd.Color
End Sub
Private Sub end_Click()
End
End Sub
Private Sub ForeColor_Click()
Cmd.Action = 3
Text1.ForeColor = Cmd.Color
End Sub
Private Sub HT_Click()
Text1.FontName = "黑体"
End Sub
Private Sub JRead_Click()
JRead.Checked = True
End Sub
Private Sub KS_Click()
Text1.FontName = "楷体_GB2312"
End Sub
Private Sub LS_Click()
Text1.FontName = "隶书"
End Sub
Private Sub new_Click()
Text1.Text = ""
End Sub
Private Sub save_Click()
Cmd.Filter = "文本文件(*.txt)|*.txt|源程序(*.asm)|*.asm|所有文件|*.*|"
Cmd.ShowSave
If Cmd.FileName = "" Then
Exit Sub
End If
Open Cmd.FileName For Output As #1
Print #1, Text1.Text
Close #1
End Sub
Private Sub SaveAs_Click()
Cmd.Filter = "文本文件(*.txt)|*.txt|源程序(*.asm)|*.asm|所有文件|*.*|"
Cmd.ShowSave
If Cmd.FileName = "" Then
Exit Sub
End If
Open Cmd.FileName For Output As #1
Print #1, Text1.Text
Close #1
End Sub
Private Sub Showl1_Click()
If Showl1.Caption = "显示" Then
Showl1.Caption = "隐藏"
Text1.Visible = False
ElseIf Showl1.Caption = "隐藏" Then
Showl1.Caption = "显示"
Text1.Visible = True
End If
End Sub
Private Sub ST_Click()
Text1.FontName = "宋体"
End Sub
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。
发表评论