有啊
uses
shhell api
...
if handle=nil then
exit else
shellexecute(handle,nil,pchar(Path/filename),nil,nil,sw_shownormal);
uses
shhell api
...
if handle=nil then
exit else
shellexecute(handle,nil,pchar(Path/filename),nil,nil,sw_shownormal);
解决方案 »
- 如何动态创建DataSet或Table
- 数据库连接不上.
- 请教高手 关于 字符串处理(string,pchar) 怪问题
- delphi中:要在form1.button1.click事件中调用form1.Formclose()事件,我要怎样做?
- 如何用程序新建ODBC的dbase数据源??delphi开发
- 冬瓜又有问题了,各位大大帮忙啊
- 怪事,Hint怎么没了
- DOCM服务器,客户端,如何配置?
- 兄弟们,请看代码有何错误?
- 其他应用程序中,得到焦点的控件(如edit,compobox)的句柄如何得到!
- 紧急求助:怎么让一个函数等于另外一个函数。
- mdac2.7, delphi6(Enterprise)+service pack2删除数据库有提示 '你的数据集有一个bof或eof为真',不能删除,使用DBGridEh(ehlib 2.3)!?'
var
zAppName:array[0..512] of char;
zCurDir:array[0..255] of char;
WorkDir:String;
tempResult :DWORD;
StartupInfo:TStartupInfo;
ProcessInfo:TProcessInformation;
begin
StrPCopy(zAppName,FileName);
GetDir(0,WorkDir);
StrPCopy(zCurDir,WorkDir);
FillChar(StartupInfo,Sizeof(StartupInfo),#0);
StartupInfo.cb := Sizeof(StartupInfo);
StartupInfo.dwFlags := STARTF_USESHOWWINDOW;
StartupInfo.wShowWindow := Visibility;
if not CreateProcess(nil,
zAppName, { pointer to command line string }
nil, { pointer to process security attributes }
nil, { pointer to thread security attributes }
false, { handle inheritance flag }
CREATE_NEW_CONSOLE or { creation flags }
NORMAL_PRIORITY_CLASS,
nil, { pointer to new environment block }
nil, { pointer to current directory name }
StartupInfo, { pointer to STARTUPINFO }
ProcessInfo) then Result := -1 { pointer to PROCESS_INF }
else begin
WaitforSingleObject(ProcessInfo.hProcess,INFINITE);
GetExitCodeProcess(ProcessInfo.hProcess,Result);
Result := tempResult;
end;
end;