VB点击按钮打开C盘

来源:百度知道 编辑:UC知道 时间:2024/05/10 11:01:33
VB点击按钮打开C盘

Private Sub Command1_Click()
Shell "explorer.exe c:\", vbMaximizedFocus
End Sub

执行:
start c:\

开始-程序-右键单击“Windows 资源管理器”-属性,可见默认值为“C:\WINDOWS\EXPLORER.EXE /n,/e,C:\”,略加修改可得到:
Private Sub Command1_Click()
Shell "EXPLORER.EXE /n,/e,C:\", vbNormalFocus
End Sub

Shell "explorere.exe c:\"