标题:為什么不能夠打開
只看楼主
jxyga111
Rank: 8Rank: 8
来 自:中華人民共和國
等 级:贵宾
威 望:33
帖 子:6015
专家分:895
注 册:2008-3-21
结帖率:70%
 问题点数:0 回复次数:2 
為什么不能夠打開
Function openfile() As String
        OpenFileDialog1.Title = "open dialog"
        '定義文件過濾器的屬性
        OpenFileDialog1.Filter = "rich text file |*.rch |*.txt"
        OpenFileDialog1.ShowReadOnly = True
        If OpenFileDialog1.ShowDialog = DialogResult.OK Then
            openfile = OpenFileDialog1.FileName
        Else
            openfile = ""
        End If
請幫忙解決
搜索更多相关主题的帖子: file 
2008-09-22 11:00
qlong0728
Rank: 3Rank: 3
等 级:新手上路
威 望:8
帖 子:272
专家分:0
注 册:2007-6-15
得分:0 
Open.Filter = "rich text file |*.rch |*.txt"
Open.FilterIndex = 2
Open.ShowDialog()

程序人员写程序,又拿程序换酒钱。 奔驰宝马贵者趣,公交自行程序员。 不见满街漂亮妹,哪个归得程序员。
2008-09-22 15:20
jxyga111
Rank: 8Rank: 8
来 自:中華人民共和國
等 级:贵宾
威 望:33
帖 子:6015
专家分:895
注 册:2008-3-21
得分:0 
謝謝解決了
Function openfile() As String
        OpenFileDialog1.Title = "open dialog"
        '定義文件過濾器的屬性
        OpenFileDialog1.Filter = "*.txt|*.txt"
        OpenFileDialog1.ShowReadOnly = True
        If OpenFileDialog1.ShowDialog = Windows.Forms.DialogResult.OK Then

            openfile = OpenFileDialog1.FileName
        Else
            openfile = ""
        End If

烈焰照耀世界,斌凍凍千萬裏
2008-09-22 15:41



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-234489-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 1.160169 second(s), 8 queries.
Copyright©2004-2025, BCCN.NET, All Rights Reserved