vs.net打开文件对话框的使用
1、新建文件“打开文件对话框”

3、向form1添加控件richtextbox1

5、添加代码Public Class Form1 '龅歧仲半打开文件 Private Sub Button1_Click(ByVal sen颊俄岿髭der As System.Object, ByVal e As _ System.EventArgs) Handles Button1.Click Dim openFile1 As New OpenFileDialog If (openFile1.ShowDialog() = DialogResult.OK) _ And (openFile1.FileName.Length > 0) Then Me.RichTextBox1.LoadFile(openFile1.FileName, _ RichTextBoxStreamType.PlainText) End If End SubEnd Class


声明:本网站引用、摘录或转载内容仅供网站访问者交流或参考,不代表本站立场,如存在版权或非法内容,请联系站长删除,联系邮箱:site.kefu@qq.com。
阅读量:94
阅读量:31
阅读量:83
阅读量:94
阅读量:80