怎么调用外部应用程序?比如调用Windows的计算器
能让外部应用程序成为我的程序的一部分吗,就像Form1.ShowModal等
能让外部应用程序成为我的程序的一部分吗,就像Form1.ShowModal等
解决方案 »
- adoquery修改数据库数据出现不正常地定义参数对象,提供了不一致或不完整的信息
- 试试发贴能不能赚30可用分
- 启用打印机及文件共享
- 【请教】一个简单的问题
- 在一个Form不能调用另一个Form的任何信息,可是编译却是没问题的。请高手帮忙,谢谢。
- 求救!!!oracle的问题
- 没分了请各位也帮个忙!!有什么程况下可以用下面例子,而不用'构造器'
- 在Form上画完一条线后,再画另一条时会把原来的删除掉,有没有办法保留原来的?
- 重谢 DBGridEH 网格控件DELPHI6的版本哪里有下载???
- 死了!!!!!毕业学生怎么样才能找到一份工作
- 树形目录生成的时候如何不让看到展开瞬间
- 有关dll子窗体关闭的问题
function WinExecAndWait32(FileName:String; Visibility :
integer):integer;
var
zAppName:array[0..512] of char;
zCurDir:array[0..255] of char;
WorkDir:String;
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);
end;
end;
转贴,没测
一般是没有办法让外部程序成为自己程序的一部分的。