开发者

How do I open a windows explorer window with a specific folder selected

I have a winform application and this winform application has created few files. I want to implement "find target" function in my application to show those files. Those files located in a same fold开发者_StackOverflow中文版er. See the picture:

How do I open a windows explorer window with a specific folder selected

Let's say that I have created few files in "C:\Test\" folder and this folder has this file: "C:\Test\File1.txt". How to create "find target" functionality using VB.NET?


Use Process.Start() to start the Windows Explorer:

Process.Start("explorer.exe", "/select," & "FILETOSELECT")

With the /select, [file] parameter, you can highlight the file.


Take a look at this article where it specifies the arguments, explorer.exe takes in

Then use System.Diagnostics.Process.Start

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜