Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Windows Forms / WinForm General / December 2004

Tip: Looking for answers? Try searching our database.

NewBie

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Dave - 08 Dec 2004 08:13 GMT
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)
Rakesh Rajan - 08 Dec 2004 08:43 GMT
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

> 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)
Herfried K. Wagner [MVP] - 08 Dec 2004 18:03 GMT
"Dave" <Dave@discussions.microsoft.com> schrieb:
>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
[quoted text clipped - 3 lines]
> 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>

Signature

M S   Herfried K. Wagner
M V P  <URL:http://dotnet.mvps.org/>
V B   <URL:http://dotnet.mvps.org/dotnet/faqs/


Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.