NewBie

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am using the below code in a vb form to open a html file that I made. My
problem is how do I get ride of the path to test.html so it can travel with
the program?

Shell("C:\Program Files\Internet Explorer\iexplore.exe D:\School
Work\CIS233\Assignment5\bin\test.html", vbMaximizedFocus)
 
Hi,

Are you trying to discard the phyical path from the full path?
If yes, you could make use the methods in the Path class.

Or are you trying to have this app load test.htm from which ever computer
you are going to run it in?
In this case, you could consider storing the path in the app.config file and
then reading from the file the path to test.htm at run-time. When the path
changes, you need to change the path in the config file and then restart the
application.

HTH,
Rakesh Rajan
 
Dave said:
I am using the below code in a vb form to open a html file that I made. My
problem is how do I get ride of the path to test.html so it can travel
with
the program?

Shell("C:\Program Files\Internet Explorer\iexplore.exe D:\School
Work\CIS233\Assignment5\bin\test.html", vbMaximizedFocus)

\\\
Imports System.IO
..
..
..
Dim FilePath As String = _
Path.Combine(Application.StartupPath, "text.html")
///

Related:

Opening files, applications, Web documents, and the mail client
<URL:http://dotnet.mvps.org/dotnet/faqs/?id=openfileappwebpage&lang=en>
 
Back
Top