Private Sub btn_openfile_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_openfile.Click
If txt_linkfile.Text = "" Then
fail("ไม่มีที่อยู่ไฟล์")
Return
End If
Process.Start(txt_linkfile.Text)
End Sub
Tag : .NET, VB.NET, VS 2008 (.NET 3.x), VS 2010 (.NET 4.x)
Private Sub btn_openfile_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_openfile.Click
If txt_linkfile.Text = "" Then
fail("ไม่มีที่อยู่ไฟล์")
Return
End If
Try
Process.Start(txt_linkfile.Text)
Catch ex As Exception
fail("ไม่มีพบที่อยู่ไฟล์")
End Try
End Sub
If Not (My.Computer.FileSystem.FileExists(pathxml)) Then
Dim writer As New XmlTextWriter(pathxml, System.Text.Encoding.UTF8)
Else
MessageBox.Show("มีไฟล์")
End If