unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, OleCtrls, SHDocVw;
type
TForm1 =
class(TForm)
WebBrowser1: TWebBrowser;
Button1: TButton;
procedure Button1Click(Sender: TObject);
private
procedure ApplicationEvents1Message(
var Msg: tagMSG;
var Handled: Boolean);
// hier muss ich vielleicht Message senden ?
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
// Put a TApplicationEvents component on your form and assign a OnMessage event handler:
procedure TForm1.ApplicationEvents1Message(
var Msg: tagMSG;
var Handled: Boolean);
begin
// check if Ctrl-N pressed
if (GetKeyState(VK_CONTROL) < 0)
and (Msg.
Message = WM_KEYDOWN)
and
(Msg.wParam = Ord('
N'))
then
begin
Handled := True;
end;
end;
procedure TForm1.Button1Click(Sender: TObject);
begin
WebBrowser1.Navigate('
http://google.com');
end;
end.