Click to See Complete Forum and Search --> : Opening an website


szms
11-29-2004, 07:40 AM
I am using VB.NET and doing windows application.

I want to open an website (such as www.hotmail.com) by clicking a button. How to do that?

PeOfEo
11-29-2004, 07:46 AM
open the website in the default browser or within a window in the application?

szms
11-29-2004, 07:52 AM
That's a good question. Didn't think about that. I would like to try both ways : "open the website in the default browser and within a window in the application" :)

PeOfEo
11-29-2004, 08:23 AM
Private Sub Form_load()
yourlink = "www.google.com"
ShellExecute hwnd, "open", "C:\Program Files\Internet Explorer\IEXPLORE.EXE", yourlink, vbNullString, 1
End Sub

something like this maybe. I used this sortof code in vb6... try it with vb.net. This uses ie though... I forgot what I did to make it use the default.