-- 作者:roy78
-- 发布时间:2009/8/4 13:16:00
--
Dim dlg As New OpenFileDialog \'定一个新的OpenFileDialog dlg.Filter= "文件文件|*.txt" \'设置筛选器 If dlg.ShowDialog = DialogResult.Ok Then \'如果用户单击了确定按钮 Dim tb As WinForm.TextBox = Forms("主窗口").Controls("TextBox1") tb.value = FileSys.ReadAllText(dlg.FileName) StatusBar.Message2= "当前打开文本为:" & dlg.FileName StatusBar.Message1="已打开 " End If