现在的位置: 首页 > 综合 > 正文

vb.net如何打开指定文件

2013年06月04日 ⁄ 综合 ⁄ 共 378字 ⁄ 字号 评论关闭
Imports System.IO
Public Class frmOpenHelpFiles
    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Dim str As String = "D:\my files\教案\电子书\高效能人士的七个习惯.chm" '文件夹的路径 可使用相对路径实现
        If File.Exists(str) Then
            System.Diagnostics.Process.Start(str)
        Else
            MsgBox("sorry ,the file is  not exists!")
        End If
    End Sub
End Class

抱歉!评论已关闭.