unit Unit1;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
OleCtrls, SHDocVw, Buttons, StdCtrls, SHDocVw_EWB, EwbCore, EmbeddedWB,
ExtCtrls;
type
TForm1 =
class(TForm)
Edit1: TEdit;
SpeedButton1: TSpeedButton;
EmbeddedWB1: TEmbeddedWB;
Timer1: TTimer;
procedure FormResize(Sender: TObject);
procedure SpeedButton1Click(Sender: TObject);
procedure Edit1KeyDown(Sender: TObject;
var Key: Word;
Shift: TShiftState);
procedure FormCreate(Sender: TObject);
procedure Timer1Timer(Sender: TObject);
private
{ Private-Deklarationen }
public
{ Public-Deklarationen }
end;
var
Form1: TForm1;
implementation
{$R *.DFM}
procedure TForm1.FormResize(Sender: TObject);
begin
EmbeddedWB1.Width := Width-16;
end;
procedure TForm1.SpeedButton1Click(Sender: TObject);
begin
EmbeddedWB1.Go(
String(Edit1.Text));
end;
procedure TForm1.Edit1KeyDown(Sender: TObject;
var Key: Word;
Shift: TShiftState);
begin
if Key = VK_RETURN
then SpeedButton1.Click;
end;
procedure TForm1.FormCreate(Sender: TObject);
begin
EmbeddedWB1.Silent := true;
end;
procedure TForm1.Timer1Timer(Sender: TObject);
begin
EmbeddedWB1.silent := false;
if EmbeddedWB1.silent
then showmessage('
Das Ding wehrt sich.');
end;
end.