S
Sergey Poberezovskiy
Hi,
As part of my Windows application, I need to open a folder
containing a file (fileName is specified in txtFile).
I have no problem opening the folder:
Dim directoryName As String = New FileInfo
(txtFile.Text).DirectoryName
Dim startInfo As System.Diagnostics.ProcessStartInfo =
New System.Diagnostics.ProcessStartInfo
With startInfo
.FileName = "explorer"
.UseShellExecute = True
.WindowStyle = ProcessWindowStyle.Normal
.Arguments = """"c & directoryName & """"c
End With
System.Diagnostics.Process.Start(startInfo)
But how do I select the file within the opened directory?
Any help is much appreciated.
As part of my Windows application, I need to open a folder
containing a file (fileName is specified in txtFile).
I have no problem opening the folder:
Dim directoryName As String = New FileInfo
(txtFile.Text).DirectoryName
Dim startInfo As System.Diagnostics.ProcessStartInfo =
New System.Diagnostics.ProcessStartInfo
With startInfo
.FileName = "explorer"
.UseShellExecute = True
.WindowStyle = ProcessWindowStyle.Normal
.Arguments = """"c & directoryName & """"c
End With
System.Diagnostics.Process.Start(startInfo)
But how do I select the file within the opened directory?
Any help is much appreciated.