|
- Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" _
- (ByVal hwnd As Long, ByVal lpOperation As String, _
- ByVal lpFile As String, ByVal lpParameters As String, _
- ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long
- '定义常量参数
- Private Const SW_SHOW = 5
- '通用调用查找函数
- Public Sub ShowFindDialog(Optional InitialDirectory As String = "")
- ShellExecute 0, "find", InitialDirectory, vbNullString, vbNullString, SW_SHOW
- End Sub
- Sub Test()
- Call ShowFindDialog("C:\Program Files")
- End Sub
复制代码
[ 本帖最后由 fan0217 于 2008-2-23 13:47 编辑 ] |
|