vb.net如何打开指定文件

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

你可能感兴趣的:(VB.NET)