本文整理自网络,侵删。
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs,ShellAPI;
type
TForm1 = class(TForm)
procedure FormCreate(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.FormCreate(Sender: TObject);
begin
ShellExecute(0, 'open',PAnsiChar(Application.Exename),nil,nil, SW_SHOWNORMAL);
ExitProcess(0);
end;
end.
相关阅读 >>
Delphi d10.x安卓app开发中简单使用原生toast
Delphi 把exe可执行文件等作为资源包含在Delphi编译文件中
Delphi 利用unigui中的tunipagecontrol实现多页面
更多相关阅读请进入《Delphi》频道 >>