如何打开Windows资源管理器窗口中选择一个特定的文件夹 [英] How do I open a windows explorer window with a specific folder selected

查看:255
本文介绍了如何打开Windows资源管理器窗口中选择一个特定的文件夹的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个WinForm应用程序,这WinForm应用程序创造了一些文件。我想实现查找目标功能,在我的应用程序,以显示这些文件。位于同一文件夹的那些文件。看到的画面:

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 folder. See the picture:

让我们说,我在创建一些文件的C:\测试\文件夹,这个文件夹下有此文件:C:\测试\ FILE1.TXT。如何创建使用VB.NET查找目标功能?

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?

推荐答案

使用<一个href="http://msdn.microsoft.com/en-us/library/system.diagnostics.process.start%28v=VS.90%29.aspx"><$c$c>Process.Start()启动Windows资源管理器:

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

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

随着 /选择[文件] 参数,可以突出显示该文件。

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

这篇关于如何打开Windows资源管理器窗口中选择一个特定的文件夹的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆