用ShellExecute()
参数:
1> nil{handle to parent window}
2> 'open'{pointer to string that specifies operation to perform.包括:open, print, explore}
3> 'Explore.exe'{pointer to filename or folder name string}
4> '参数'{pointer to string that specifies executable-file parameters}
5> 'C:\WINNT'{pointer to string that specifies default directory}
6> SW_RESTORE{whether file is shown when opened}
{包括:SW_HIDE,SW_MAXIMIZE,SW_MINIMIZE,SW_RESTORE,SW_SHOW,SW_SHOWDEFAULT,SW_SHOWMAXIMIZED,SW_SHOWMINIMIZED,SW_SHOWMINNOACTIVE,SW_SHOWNA,SW_SHOWNOACTIVATE,SW_SHOWNORMAL.
注意:If 如果文件名称包括文档文件,这个参数必须是0}
ShellExecute有2种效果,一种是类似我的电脑的,另一种是类似资源管理器的。
看看Delphi带的Win32SDK帮助就知道了。