Open default internet browser.

I want to open the with the default internet browser the home page of that browser, with vb net, for XP, vista, win 7, win8.
Solution 19298082 did not work because I get an error with

 If htmlShellOpenKey == Nothing Then
            Return Nothing
        End If

VB net 2012 doesn't like the == and doesn't like = either.
Who is Participating?
papaT555Connect With a Mentor Author Commented:
i found it myself, but i have zero computer training.
the answer is something like this
 Dim myBrowser As String = My.Computer.Registry.GetValue(" HKEY_CURRENT_USER\Software\Clients\StartMenuInternet", "", "Not Found")

getting this error
 Registry key name must start with a valid base key name.

can someone show me how to fix this. the data entry is correct for all browsers?
Jacques Bourgeois (James Burger)PresidentCommented:

== does not work in VB
= does work, but only with value objects (Integer, String, Date...)

With reference objects (any object based on a class), you need to use Is:

 If htmlShellOpenKey Is Nothing Then
papaT555Author Commented:
but i don't want a specific URL. i want the default browser's default homepage.
papaT555Connect With a Mentor Author Commented:
Got it. had an extra space before the HKEY and added a CSTR(
now works.

To Moderator.
I really like this site and will use it often.
But since I turned out to be the expert on this one, do I get my money back?
How does it work?
Thanks, papaT555
This question has been classified as abandoned and is closed as part of the Cleanup Program. See the recommendation for more details.
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.

All Courses

From novice to tech pro — start learning today.