CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 5 of 5
  1. #1
    Join Date
    Nov 2000
    Posts
    1

    Launching default broweser with default webpage

    Hi, folks,
    What is the easiest way to launch default web browser showing the default webpage?
    I know how to launch a specific web page.
    I'd like to know how to launch "default" web page configured in web browser.
    Thank you.



  2. #2
    Join Date
    Mar 2000
    Location
    Birmingham, England
    Posts
    2,520

    Re: Launching default broweser with default webpage

    This will open a page with the default browser ...


    ShellExecute(NULL, "open", "c:\\yourpage.html", NULL, NULL, SW_SHOW);




    Jase

    <no witty trailer supplied>

    Jase

    www.slideshowdesktop.com
    View your images and photos on your desktop with ease using SlideShow Desktop, the desktop wallpaper manager for Microsoft Windows.
    ...

  3. #3

    Re: Launching default broweser with default webpage

    Hi,
    You can get the default browser from your registry,
    [Key="HKey Classes Root\http\shell\open\command"]

    Then,
    ShellExecute(NULL,"Open",STRING FROM REGISTRY,NULL,NULL,SW_SHOW);










    Regards,
    Sreedharan.
    Regards,
    Sreedharan

  4. #4
    Join Date
    Mar 2000
    Location
    Birmingham, England
    Posts
    2,520

    Re: Launching default broweser with default webpage

    If you don't specify the application you wish to open the file with, ShellExecute will automatically open that file with the default application associated with that file extension (or fail if one doesn't exist). So it is not necessary to query the registry for the default browser in this instance.

    Jase

    <no witty trailer supplied>

    Jase

    www.slideshowdesktop.com
    View your images and photos on your desktop with ease using SlideShow Desktop, the desktop wallpaper manager for Microsoft Windows.
    ...

  5. #5
    Join Date
    Mar 2000
    Location
    Birmingham, England
    Posts
    2,520

    Re: Launching default broweser with default webpage

    Actually, Sree is correct - i misread your post - you want to launch a browser and open the browsers home page, rather than open the browser with your own html file ...

    Please ignore my previous post

    Jase

    <no witty trailer supplied>

    Jase

    www.slideshowdesktop.com
    View your images and photos on your desktop with ease using SlideShow Desktop, the desktop wallpaper manager for Microsoft Windows.
    ...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured