viewing html files in VB form

Jerome Brown

Member
Joined
Oct 21, 2004
Messages
8
Programming Experience
Beginner
Hi,
I am a novice VB.NET user. I used the AWbrowser to view a web page on my form and it worked perfectly. The problem comes when I try to view a html file stored locally. It works when I include the entire path
(i.e. ...
AxWebBrowser1.Navigate("C:\Documents and Settings\My Documents\Visual Studio Projects\Xproject1\bin\Xdir\xhtm2.htm", nullObject, nullObjStr, nullObjStr, nullObjStr)

Now, I stored the html document in the bin document because I need to deploy this application and I only wanted to have to include "Xdir\xthm2.htm"
instead having to include the whole path. Is this possible?
 

PatRoy

New member
Joined
Oct 20, 2004
Messages
2
Location
Petit-Rocher, NB, Canada
Programming Experience
1-3
try using AxWebBrowser1.Navigate(Application.StartupPath & "\Xdir\xhtm2.htm", nullObject, nullObjStr, nullObjStr, nullObjStr)

The Application.StartupPath is where your .exe is.
 
Top Bottom