rowternet
asked on
Application.executablepath - to specify the path for the htm file
Hi,
When debugging my application, i call this method which loads the webbrowser and this in turn loads the javascript file.(First 2 lines)
When i create a set up & deployment project, i assume, i have to use the application.executable path i guess. So, i replaced the exe with the htm file here.
But it does not load the webbrowser and the map.
Why is the map not loading in run mode?
Public Sub LoadMap()
'Debug mode - works (Testing purposes, i give this path to the html file.) . In Debug mode, application.executablepath also works.
'Me.WebBrowser1.Url = New Uri("D:\App Folder\Test_TransMgr\TRMgr Project\Ge oLocateMai ntenance.h tm")
'Me.WebBrowser1.ObjectForS cripting = Me
'Running Exe - Fails
Dim abc As String = Nothing
abc = Application.ExecutablePath .Replace(" TRMgrProje ct.EXE", "GeoLocateMaintenance")
'abc = Application.StartupPath.Re place("bin \Debug\", "GeoLocateMaintenance")
Me.WebBrowser1.Url = New Uri(abc)
Me.WebBrowser1.ObjectForSc ripting = Me
End Sub
Thanks in Advance
When debugging my application, i call this method which loads the webbrowser and this in turn loads the javascript file.(First 2 lines)
When i create a set up & deployment project, i assume, i have to use the application.executable path i guess. So, i replaced the exe with the htm file here.
But it does not load the webbrowser and the map.
Why is the map not loading in run mode?
Public Sub LoadMap()
'Debug mode - works (Testing purposes, i give this path to the html file.) . In Debug mode, application.executablepath
'Me.WebBrowser1.Url = New Uri("D:\App Folder\Test_TransMgr\TRMgr
'Me.WebBrowser1.ObjectForS
'Running Exe - Fails
Dim abc As String = Nothing
abc = Application.ExecutablePath
'abc = Application.StartupPath.Re
Me.WebBrowser1.Url = New Uri(abc)
Me.WebBrowser1.ObjectForSc
End Sub
Thanks in Advance
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Hi, theplonk,
Thanks.
Including the content files made the difference.
Thanks.
Including the content files made the difference.
abc = Path.GetDirectoryName(Asse