很简单,调用explorer.exe就可以,例如要打开H:\CD1并且选中其中的readme.rtf:
Private Sub Command1_Click()
Shell "Explorer /select, H:\CD1\readme.rtf", vbNormalFocus
End Sub
[Windows Explorer Switches]
Windows Explorer switches are useful in creating rooted folders:
Private Sub Command1_Click()
Shell "Explorer /select, H:\CD1\readme.rtf", vbNormalFocus
End Sub
[Windows Explorer Switches]
Windows Explorer switches are useful in creating rooted folders:
Explorer [/e][,/root,<object>][[,/select],<sub object>]
/e
Use Explorer view (scope and results pane view). The default is
Open view (results in pane view only).
/root<object>
Specify the object in the "normal" name space that is
used as the root (top level) of this Explorer/Folder (i.e., local
path or UNC name). The default is the Desktop).
/Select
The parent folder opens and the specified object is selected.
<sub object> Specify the folder unless /select is used. The
default is the root.
本文介绍了Windows系统中Explorer命令的使用,包含参数 /e、/root<object>、/Select 等。/e 可使用 Explorer 视图;/root<object> 能指定作为根目录的对象;/Select 可使父文件夹打开并选中指定对象。
333

被折叠的 条评论
为什么被折叠?



