unit Unit1;
interface
uses
System.SysUtils, System.Types, System.UITypes, System.Classes, System.Variants,
FMX.Types, FMX.Controls, FMX.Forms, FMX.Graphics, FMX.Dialogs, FMX.WebBrowser,
FMX.StdCtrls, FMX.Controls.Presentation, FMX.Edit, FMX.Layouts, FMX.ListBox;
type
TForm1 =
class(TForm)
WebBrowser1: TWebBrowser;
Edit1: TEdit;
Button1: TButton;
ListBox1: TListBox;
procedure Button1Click(Sender: TObject);
procedure WebBrowser1ShouldStartLoadWithRequest(ASender: TObject;
const URL:
string);
procedure WebBrowser1DidFinishLoad(ASender: TObject);
procedure WebBrowser1DidStartLoad(ASender: TObject);
private
{ Private-Deklarationen }
public
{ Public-Deklarationen }
end;
var
Form1: TForm1;
implementation
{$R *.fmx}
procedure TForm1.Button1Click(Sender: TObject);
begin
ListBox1.Clear;
WebBrowser1.Navigate(Edit1.Text);
end;
procedure TForm1.WebBrowser1DidFinishLoad(ASender: TObject);
begin
ListBox1.Items.Add('
DidFinishLoad ' + WebBrowser1.URL);
end;
procedure TForm1.WebBrowser1DidStartLoad(ASender: TObject);
begin
ListBox1.Items.Add('
DidStartLoad ' + WebBrowser1.URL);
end;
procedure TForm1.WebBrowser1ShouldStartLoadWithRequest(ASender: TObject;
const URL:
string);
begin
ListBox1.Items.Add('
ShouldLoadWithRequest '+
URL);
end;
end.