教程集 www.jiaochengji.com
教程集 >  操作系统  >  windows  >  正文 使用OpenFilleDailog打开文件。

使用OpenFilleDailog打开文件。

发布时间:2019-12-15   编辑:jiaochengji.com
教程集为您提供使用OpenFilleDailog打开文件。等资源,欢迎您收藏本站,我们将为您提供最新的使用OpenFilleDailog打开文件。资源
    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Dim fdlg As OpenFileDialog = New OpenFileDialog()
        fdlg.Title = "VB.net打开文件对话框的使用"
        fdlg.InitialDirectory = "c:"
        fdlg.Filter = "All files (*.*)|*.*"
        fdlg.FilterIndex = 2
        fdlg.RestoreDirectory = True
        If fdlg.ShowDialog() = DialogResult.OK Then
       TextBox1.Text = fdlg.FileName
        End If
    End Sub
附上示例的所有代码:(UseOpenFileDailog.VB)
Public Class UseOpenFileDialog
    Inherits System.Windows.Forms.Form
#Region " Windows Form Designer generated code "
    Public Sub New()
        MyBase.New()
        'This call is required by the Windows Form Designer.
        InitializeComponent()
        'Add any initialization after the InitializeComponent() call
    End Sub

您可能感兴趣的文章:
使用OpenFilleDailog打开文件。
php fopen实例教程
php文件怎么打开,用什么软件打开php文件
php后缀是什么文件怎么打开
office 2003的word提示:使用安全模式打开解决办法
php文件操作之读取与写入文件
python中怎么打开文件夹
python怎么读取文件内容
在IE8不能使用Adobe Reader打开PDF文件解决办法
怎么打开php网页

[关闭]
~ ~