Lanching the user's default web browser with a local file 
Author Message
 Lanching the user's default web browser with a local file


Quote:

>Hi,

>How does one launch whatever the user's default web browser from a VB
>app under win95? Is there a way to find out such info, and to send a
>local file to the browser for display ?

>Please CC a response to my email address too.
>Thanks a lot for any help,

>Mounir El Abridi/

I've just started looking at a similar problem and have some ideas.  I haven't
had a chance to try them yet, but I'll tell you what I'm thinking, anyway.  
Maybe you can let me know if it works!

In the registry, there is a place that lists file types based on file
extensions (HKEY_LOCAL_MACHINE\SOFTWARE\Classes.  There should be an item under
this key for .htm and .html files.  These should both have a file type
associated with them (on my computer it's "NetscapeMarkup".  With this item,
you should be able to find  
HKEY_LOCAL_MACHINE\SOFTWARE\Classes\NetscapeMarkup\shell\open\command.  On my
machine the (Default) value is "path...\NETSCAPE.EXE "%1"" (substitute whatever
path).  I don't know why the string has embedded quotes.  They may be important
or may not.  I would bet that substituting the file you want to open for the %1
 in that command would do the trick.

Again, I'm only speculating at this point.  If you try it or find a better
solution, let me know.

Good luck,

Mike Shadley



Sun, 31 Oct 1999 03:00:00 GMT  
 Lanching the user's default web browser with a local file

Simply use ShellExecute API call and place the name of the .htm file in the
path.  The default browser is always associated with .htm and .html so it
will automatically launch the browser and load your file.

Enzo Maini



Quote:

> >Hi,

> >How does one launch whatever the user's default web browser from a VB
> >app under win95? Is there a way to find out such info, and to send a
> >local file to the browser for display ?

> >Please CC a response to my email address too.
> >Thanks a lot for any help,

> >Mounir El Abridi/

> I've just started looking at a similar problem and have some ideas.  I
haven't
> had a chance to try them yet, but I'll tell you what I'm thinking,
anyway.  
> Maybe you can let me know if it works!



Mon, 01 Nov 1999 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Lanching the user's default web browser with a local file

2. Calling the user's default Web browser in VB5

3. Creating Text File on Client's Local Machine When Accessing Web Default Page

4. Lanching Web Browser Form VB

5. How to make my web browser as a default web browser

6. Launching the users default web browser

7. Launching the users default Web browser

8. Web Browser Control and local HTML files

9. I'm looking for the key of the default web browser in the registry

10. Passing URL to user's default browser

11. Launching Default Web Browser to Display File

12. Open a file in the client browser from it'is local drive

 

 
Powered by phpBB® Forum Software