vb 控件openfiledialog路径怎么设置?

来源:百度知道 编辑:UC知道 时间:2024/05/26 20:43:23
这是我写的,可调试的时候总说空路径是非法的!求高手指点!

openfiledialog1 .Filter = "(*.txt)|*.txt"
openfiledialog1.ShowDialog()
RichTextBox1.LoadFile(openfiledialog1.FileName, RichTextBoxStreamType.PlainText)

openfiledialog1 .Filter = "(*.txt)|*.txt"
openfiledialog1.Showopen
RichTextBox1.LoadFile(openfiledialog1.FileName,RichTextBoxStreamType.PlainText)

要加入openfiledialog的控件 然后 弄个Command1 代码为 .show

试试看是不是你要的