我想在表单创建事件上加载默认 URL,我可以使用按钮单击加载 url,但我希望它在应用程序加载时加载 URL,当我运行程序时它不会加载 url。
这是我的代码:
unit launcher;
interface
uses
Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.Imaging.pngimage, Vcl.ExtCtrls,
Vcl.StdCtrls, Vcl.OleCtrls, SHDocVw;
type
TForm1 = class(TForm)
Image1: TImage;
Button1: TButton;
WebBrowser1: TWebBrowser;
procedure Button1Click(Sender: TObject);
procedure FormCreate(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.FormCreate(Sender: TObject);
begin
Webbrowser1.Navigate('http://www.digitalxeon.net');
end;
procedure TForm1.Button1Click(Sender: TObject);
close;
end;
end.