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

    how do i specify IE's default web site into this sub......

    Hi,

    At the moment, ie is opening with the site in the code below. What code should I use to get ie to open on the site which is the default home page?

    Thanks for any help...

    Private Sub mnuBrowser_Click()
    Dim lngReturn As Long
    lngReturn = Shell("start http://www.msn.co.uk", vbNormalFocus)
    End Sub


  2. #2
    Join Date
    Aug 2000
    Location
    Ottawa, Canada
    Posts
    469

    Re: how do i specify IE's default web site into this sub......

    1) find out what is the dafault browser on the user's machine. It's in Registry here: "HKEY_CLASSES_ROOT\htmlfile\shell\opennew\command"
    or here: "HKEY_LOCAL_MACHINE\SOFTWARE\Classes\htmlfile\shell\opennew\command"

    2) then just run it

    For example on my machine Registry contains this text "C:\Program Files\Internet Explorer\iexplore.exe". So, I do:

    lngReturn = Shell("C:\Program Files\Internet Explorer\iexplore.exe", vbNormalFocus)







  3. #3
    Join Date
    May 2001
    Location
    MO, USA
    Posts
    87

    Re: how do i specify IE's default web site into this sub......

    or you can do this
    lngReturn = Shell("C:\Program Files\Internet Explorer\iexplore.exe" http://www.msn.co.uk, vbNormalFocus)


    always works for me

    midnightservice


  4. #4
    Join Date
    May 2001
    Location
    MO, USA
    Posts
    87

    Re: how do i specify IE's default web site into this sub......

    sorry i missed typed my earlier string here is the correct string

    lnreturn = Shell("c:\program files\internet explorer\iexplore.exe http://www.msn.co.uk", vbNormalFocus)



    midnightservice



  5. #5
    Join Date
    Aug 2000
    Location
    Ottawa, Canada
    Posts
    469

    Re: how do i specify IE's default web site into this sub......

    I think you've missed the problem which is: "Run default browser without providing any URL."


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