Jump to content

Please Help Me !!!

- - - - -

  • Please log in to reply
1 reply to this topic

#1
TK1993

TK1993

    Newbie

  • Members
  • Pip
  • 1 posts
Hi Everyone!
I have Problem at VB6.

I open the Html File with Web Browser But i can Open it Only With This Code:

webbrowser.Navigate2 "d:\1.htm"

But i want open it of the Folder Root Like this:

webbrowser.Navigate2 "1.htm"

But web browser Can't Open my Html File.

Can u Help Me what can i do for open the Html File of The Root Folder???
Thanks
:)[COLOR="Silver"]

Edited by TK1993, 05 September 2011 - 05:01 AM.


#2
HallmanBilly

HallmanBilly

    Newbie

  • Members
  • Pip
  • 1 posts
First you have to define some path the browser control navigate to. If your file is in the same directory as the compiled application for example, you could use the following:

Private Sub Form_Load()
webbrowser.navigate2(app.path & "\1.htm")
End Sub

Or if you wanted to be more dynamic you could save a value to the registry and retrieve it and use that as a way to alleviate hard coding the file name in to your program. I assume that might be a far stretch as you seem to be more on the novice side of VB6.

I hope this helps.

-Billy




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users