Automation for Windows Explorer

  • Thread starter Thread starter HS1
  • Start date Start date
H

HS1

Hello
Could you please help a code so I can open a folder in windows explorer when
I click a button, (e.g explorer automation)
Thank you
SH
 
Son

\\\Set a reference to SHDocVw.dll and one button on a form
Public WithEvents Explorer As SHDocVw.InternetExplorer
Private Sub Button1_Click(ByVal sender As System.Object, _
ByVal e As System.EventArgs) Handles Button1.Click
Explorer = New SHDocVw.InternetExplorer
Explorer.Visible = True
Explorer.Navigate("http://msdn.microsoft.com")
End Sub
////
I hope this helps a little bit?

Cor
 
Thank you very much Cor
My question is for Windows Explorer, not for Internet explorer (for openning
a folder)
Thank you
SH
 
Son,

Sorry that is so easy in a long format it can much shorter however now you
see what happens

\\\
Dim p As New Process
Dim pi As New ProcessStartInfo
pi.arguments = "c:\"
pi.FileName = "explorer.exe"
p.startinfo = pi
p.Start()
///

I hope this helps better,

Cor
 
HS1 said:
Could you please help a code so I can open a folder in windows explorer
when
I click a button, (e.g explorer automation)

\\\
Imports System.Diagnostics
..
..
..
Process.Start("explorer", "C:\WINDOWS")
///
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top