西游记 师姐妩媚:这delphi程序里如何使其运行时不显示黑色的cmd程序界面?

来源:百度文库 编辑:高校问答 时间:2024/04/24 19:36:13
比如这样的api程序怎么改只运行程序不显示黑色cmd窗口。
unit Unit1;

interface

uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls,shellapi;
//添加shellapi
type
TForm1 = class(TForm)
Button1: TButton;
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;

var
Form1: TForm1;

implementation

{$R *.dfm}

procedure TForm1.Button1Click(Sender: TObject);
begin
ShellExecute(0, 'open', 'iexplore.exe', 'http://www.baidu.com', '', SW_SHOWNORMAL);
end;

end.