首先在uses中引用shellapi单元
procedure TForm1.Button1Click(Sender: TObject);
begin
ShellExecute(Handle,'open',pchar('可执行程序路径'),nil,nil,SW_SHOWNORMAL);
end;
本文介绍了一种使用Delphi中的ShellAPI单元来调用外部可执行文件的方法。通过简单的示例代码展示了如何利用ShellExecute过程来打开指定路径下的程序,并设置窗口显示方式。
首先在uses中引用shellapi单元
procedure TForm1.Button1Click(Sender: TObject);
begin
ShellExecute(Handle,'open',pchar('可执行程序路径'),nil,nil,SW_SHOWNORMAL);
end;

被折叠的 条评论
为什么被折叠?