1个回答
2013-11-19
展开全部
请加上我的黑色部分,给你做了修改:
Private Sub mnuOpen_Click()
CommonDialog1.Filter = "文本文档(*.txt)|*.txt|RTF文档(*.rtf)|*.rtf|所有文件(*.*)|*.*"
CommonDialog1.ShowOpen
RichTextBox1.Text = ""
FileName = CommonDialog1.FileName
RichTextBox1.LoadFile FileName
RichTextBox1.Refresh
Me.Caption = "文件路径——" & FileName
RichTextBox1.SelStart = 0
RichTextBox1.SelLength = Len(RichTextBox1.Text)
RichTextBox1.SelColor = vbGreen
End Sub
Private Sub Form_Load()
Me.Height = 6000
Me.Width = 9000
RichTextBox1.BackColor = vbBlack
RichTextBox1.SelStart = 0
RichTextBox1.SelLength = Len(RichTextBox1.Text)
RichTextBox1.SelColor = vbGreen
End Sub
Private Sub mnuOpen_Click()
CommonDialog1.Filter = "文本文档(*.txt)|*.txt|RTF文档(*.rtf)|*.rtf|所有文件(*.*)|*.*"
CommonDialog1.ShowOpen
RichTextBox1.Text = ""
FileName = CommonDialog1.FileName
RichTextBox1.LoadFile FileName
RichTextBox1.Refresh
Me.Caption = "文件路径——" & FileName
RichTextBox1.SelStart = 0
RichTextBox1.SelLength = Len(RichTextBox1.Text)
RichTextBox1.SelColor = vbGreen
End Sub
Private Sub Form_Load()
Me.Height = 6000
Me.Width = 9000
RichTextBox1.BackColor = vbBlack
RichTextBox1.SelStart = 0
RichTextBox1.SelLength = Len(RichTextBox1.Text)
RichTextBox1.SelColor = vbGreen
End Sub
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询