IE from Windows form

Yes you can...
create a form, add a button and under the click event of the button put the followin code

Code:
Dim ie As Process
ie.Start("iexplore.exe", "http://www.yahoo.com")

this should work

Regards
 
Here's another method:
C#:
System.Diagnostics.Process.Start("http://www.yahoo.com");

It will open in whatever your default browser is.

-Nerseus
 
Using shell is the VB6 way, using the process class or the system.diagnostics is the .NET way, don't use shell
 
Try the .NET way

shIE = New SHDocVw.InternetExplorer()
With shIE
.AddressBar = False
.FullScreen = False
.MenuBar = False
.Resizable = True
.StatusBar = False
.TheaterMode = False
.ToolBar = Convert.ToInt32(False)
.Height = 575
.Width = 750
.Top = 20
.Left = 20
.Visible = True
Call .Navigate(URL)
End With
 
Opening Explorer . . . Newbie

I am trying to use this code below, on one form project it works but on another I am getting a debug error 'SHDocVw.InternetExplorer' is not defined.


' Open Internet explorer with no link bar
Dim shIE
shIE = New SHDocVw.InternetExplorer()
With shIE
.AddressBar = False
.FullScreen = False
.MenuBar = False
.Resizable = True
.StatusBar = False
.TheaterMode = False
.ToolBar = Convert.ToInt32(False)
.Height = 550
.Width = 800
.Top = 0
.Left = 0
.Visible = True
Call .Navigate(LinkLabel1.Tag)
End With
' END Internet explorer with no link bar
 
To use that method you need to add a refernce to shdocvw.dll, and
I have no idea where in windows it is. Just stick to the Process.Start
way, and you'll be fine. :)
 
Reference

add the reference from the COM tab it is the 'Microsoft Internet Controls' (C:\WINNT\System32\shdocvw.dll).

lates :cool:
 
I got it. . . . . Thanks

Thanks for the super fast feedback. I found the answer.

I needed to goto PROJECT then:

Add REFERENCE, Microsoft Internet Control, SELECT

I guess I did that at some time on the other form without knowing it.
 
Back
Top