瑞星卡卡安全论坛

首页 » 技术交流区 » 系统软件 » 帮帮我吧   万分紧急
摩天大侠 - 2008-1-8 17:40:00



帮我改一下   用VB编的
下面是代码:
Dim sFind As String
Dim FileType, FiType As String

Private Sub Command1_Click()
CommonDialog1.Filter = "文本文档(*.txt)|*.txt|RTF文档(*.rtf)|*.rtf|所有文件(*.*)|*.*"
CommonDialog1.ShowOpen
RichTextBox1.Text = ""
FileName = CommonDialog1.FileName
RichTextBox1.LoadFile FileName
Me.Caption = "文本文档:" & FileName
End Sub

Private Sub Command3_Click()
Clipboard.Clear
Clipboard.SetText RichTextBox1.SelText
End Sub

Private Sub Command4_Click()
Clipboard.Clear
Clipboard.SetText RichTextBox1.SelText
RichTextBox1.SelText = ""
End Sub

Private Sub Command5_Click()
RichTextBox1.SelText = Clipboard.GetText
End Sub

Private Sub Form_Load()

End Sub

Private Sub Toolbar1_ButtonClick(ByVal Button As MSComctlLib.Button)
Select Case Button.Index
Case 1
RichTextBox1.Text = ""
FileName = "未命名"
Me.Caption = FileName
Case 2
CommonDialog1.Filter = "文本文档(*.txt)|*.txt|RTF文档(*.rtf)|*.rtf|所有文件(*.*)|*.*"
CommonDialog1.ShowOpen
RichTextBox1.Text = ""
FileName = CommonDialog1.FileName
RichTextBox1.LoadFile FileName
Me.Caption = "文本文档:" & FileName
Case 3
Case 4
Clipboard.Clear
Clipboard.SetText RichTextBox1.SelText
RichTextBox1.SelText = ""
Case 5
Clipboard.Clear
Clipboard.SetText RichTextBox1.SelText
Case 8
Clipboard.Clear
RichTextBox1.SelText /
End Select
End Sub

Private Sub 背景_Click(Index As Integer)

End Sub

Private Sub 打开_Click(Index As Integer)
CommonDialog1.Filter = "文本文档(*.txt)|*.txt|RTF文档(*.rtf)|*.rtf|所有文件(*.*)|*.*"
CommonDialog1.ShowOpen
RichTextBox1.Text = ""
FileName = CommonDialog1.FileName
RichTextBox1.LoadFile FileName
Me.Caption = "文本文档:" & FileName
End Sub

Private Sub 段落_Click(Index As Integer)

End Sub

Private Sub 复制_Click(Index As Integer)
Clipboard.Clear
Clipboard.SetText RichTextBox1.SelText
End Sub

Private Sub 关闭_Click(Index As Integer)
End
End Sub

Private Sub 剪贴_Click(Index As Integer)
Clipboard.Clear
Clipboard.SetText RichTextBox1.SelText
RichTextBox1.SelText = ""
End Sub

Private Sub 清除_Click(Index As Integer)
RichTextBox1.Text = ""
End Sub

Private Sub 全选_Click(Index As Integer)

End Sub

Private Sub 新建_Click(Index As Integer)
RichTextBox1.Text = ""
FileName = "未命名"
Me.Caption = FileName
End Sub

Private Sub 粘贴_Click(Index As Integer)
RichTextBox1.SelText = Clipboard.GetText
End Sub

Private Sub 字体_Click(Index As Integer)

End Sub

[用户系统信息]Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1)
1