Link to home
Start Free TrialLog in
Avatar of Mathwiz314
Mathwiz314

asked on

EASY POINTS!!!!!!!!!!! OPEN Start up HTMLfile in VB

HI
I'm using VB 6 to program a browser.
I set my program as the default program to open a HTML file.
When I clicked the HTML file, it opened my program, but doesn't show the file in the webbrowser control.
Is there any way to open the file by clicking it on my desktop?

Thanks
Avatar of sirbounty
sirbounty
Flag of United States of America image

How did you set it up?
Usually there's a reference like
appname.exe "%1"
to denote to open the target with your app...
Avatar of Mathwiz314
Mathwiz314

ASKER

what do you mean?
Well, usually when you set a file type to open with a specific app, the registry is updated to reflect this...
For instance, if you check your HKCR\txtfile\shell\open\command
you'll find a value there to determine that notepad opens %1 - the parameter passed to it (i.e, the file name):

%SystemRoot%\system32\NOTEPAD.EXE %1

Check your extension under that hive...
I already did that.
It's just that it doesn't display that file in the webbrowser control
never mind I didn't read your comment carefully
I don't understand you
"I set my program as the default program to open a HTML file."
How did you do this?
hi, please correct me if im wrong.... you want to open your program from the desktop like clicking on the icon right? then you can export your program to exe. in vb 6 there is a command to export the program to exe format.
@ tang tzuchi
no, I want open an html file by clicking the icon

@sirbounty
I right clicked to html icon and clicked "open with ..." > "choose program"
then I browsed for my program exe ,
next I checked "Alway use  the selected program ..."
and clicked ok
Okay, so if you search for you program in the registry, you should find the reference in the HKey_Classes_Root hive path that I mentioned before...
yes
I need to display the file I'm opening in the webbrowser control
Where is everyone?
I'm not sure how to further assist here...I had hoped that someone else would chime in...
I'm increasing the value of this Question
You might try placing some pointer questions...
what?
ASKER CERTIFIED SOLUTION
Avatar of Mark_FreeSoftware
Mark_FreeSoftware
Flag of Netherlands image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
it knows the string but it navigates
file:///"filename"
the quotes are still there
never mind
i did this
strOpenFile = Mid$(strOpenFile, 2, lenFile - 2)
thanks