Question Locked

Visual Basic.Net 2005: Can I open Internet Explorer and Windows Explorer?

0 helpful
4 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

Greetings all,

First off, it?s been a couple years since I did any visual basic programming, so I know I?m a bit rusty.

I?m trying to get one button on my Windows Application to call up the Adobe homepage in Internet explorer, and another button to open a folder called Documents in Windows Explorer. Both are functions I don?t think I have ever coded before, and I am having little success. Below are code examples/templates

Dim wbShow As New WebBrowser

Private Sub btnDocuments_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnSDM.Click
'''''what code should go here to call up
''''' windows explorer or something similar?
End Sub

Private Sub btnAdobe_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnAdobe.Click
____wbShow.Navigate("http://www.adobe.com")
'''''above code causes errors reguarding security,
''''' any idea how to fix or know any alternate functions?
End Sub

Any help would be greatly appreciated.

4 replies

by rtshaub

To open ie and navigate to www.adobe.com, use this line:
Shell(Chr(34) & "C:\Program Files\Internet Explorer\IEXPLORE.EXE" & Chr(34) & " http://www.adobe.com", AppWinStyle.NormalFocus)

For explorer, use this:
Shell("C:\WINDOWS\explorer.exe c:\Documents")

by lovedave

This Really works
Shell(Chr(34) & "C:\Program Files\Internet Explorer\IEXPLORE.EXE" & Chr(34) & " http://www.adobe.com", AppWinStyle.NormalFocus)

This discussion is closed to new replies.