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
LVL 1
Mathwiz314Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

sirbountyCommented:
How did you set it up?
Usually there's a reference like
appname.exe "%1"
to denote to open the target with your app...
0
Mathwiz314Author Commented:
what do you mean?
0
sirbountyCommented:
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...
0
Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Mathwiz314Author Commented:
I already did that.
It's just that it doesn't display that file in the webbrowser control
0
Mathwiz314Author Commented:
never mind I didn't read your comment carefully
0
Mathwiz314Author Commented:
I don't understand you
0
sirbountyCommented:
"I set my program as the default program to open a HTML file."
How did you do this?
0
tang_tzuchiCommented:
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.
0
Mathwiz314Author Commented:
@ 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
0
sirbountyCommented:
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...
0
Mathwiz314Author Commented:
yes
0
Mathwiz314Author Commented:
I need to display the file I'm opening in the webbrowser control
0
Mathwiz314Author Commented:
Where is everyone?
0
sirbountyCommented:
I'm not sure how to further assist here...I had hoped that someone else would chime in...
0
Mathwiz314Author Commented:
I'm increasing the value of this Question
0
sirbountyCommented:
You might try placing some pointer questions...
0
Mathwiz314Author Commented:
what?
0
Mark_FreeSoftwareCommented:

okay, when your program starts, you are loading a form?

let's call that form1

now place this code in form1:


Private sub Form_Load()
   dim str as string
   str = Command$
   if len(trim(str)) <> 0 then
      'place here your code to navigate to the url,
       ' it is stored in str
       'could be something like Webbrowser1.navigate str
   end if
end sub

what you are doing here:
reading the commandline (Command$) and place it in the string str
check if str is not empty (the program was started by clicking on a file!)
and then you have to fill in your own code to do somthing with the url you just obtained
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Mathwiz314Author Commented:
it knows the string but it navigates
file:///"filename"
the quotes are still there
0
Mathwiz314Author Commented:
never mind
i did this
strOpenFile = Mid$(strOpenFile, 2, lenFile - 2)
thanks
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Web Applications

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.