Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Query strings

Status
Not open for further replies.

EKelly

Programmer
Jul 3, 2002
49
IE
Hello,

I would like some help on opening an internet explorer window through Visual Basic. I am using the explorer to navigate the help files of my application. The index page consists of two frames - a navigation frame with links to all topics and a topic frame to display the actual topic (standard help format!). When I call the index page from behind my help buttons in the visual basic page i use the following string:

Code:
'Parameter is the path of the index file. 
'AllocDocName's value is iexplore.exe

StartDoc = ShellExecute(Scr_hDC, "Open", AllocDocName, Parameter, "C:\", SW_SHOWNORMAL)

This works fine. However I would like the help button on my different vb forms to open up the index file with the topic frame displaying the help page specific to that form. In order to do this I have set up a javascript query in the index page's html to receive the desired location of the topic frame, ie the query will set the topic frame to whatever .htm page it is passed.

Now heres the problem. When opening the index page through the explorer itself (independent of vb) I can use the following:

c:\Program Files\Folder Name1\Folder Name2\index.htm?content=Topic1.htm

This opend the index page with the topic frame set to whatever I specified as Topic 1 - Perfect. But when I use this same string with the shellexecute command as the parameter value (mentioned at the start) I get an error message telling me the file cann't be found(which when you think about it makes sense.)

Does anyone know any way of opening a file in the explorer and then passing it a query string value or has anyone any suggestions about going about this task a different way. Any help would be greatly appriciated.

Thanks in advance
Erin
 
I know you have your reasons for using the help inside the vb application. But wouldn't it be easier to use a standard .chm help file, it uses html files and it handles the index for you. If you go this way, let me know if you need more help.

Hope this helps
David.

 
Thanks for the suggestion. I will look into it and take you up on that offer of help if needed!. However I am on a tight schedule and this was a quick fix for the help files so if anyone knew a way to pass parameters from vb to a html query written in Javascript I would be extremly happy! If not I will have to find alternative soultions.

Thanks for you help
Erin
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top