unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, OleCtrls, SHDocVw,
ActiveX,MSHTML;
type
TForm1 =
class(TForm,IServiceProvider)
WebBrowser1: TWebBrowser;
Button1: TButton;
procedure Button1Click(Sender: TObject);
procedure WebBrowser1DocumentComplete(Sender: TObject;
const pDisp: IDispatch;
var URL: OleVariant);
private
{ Private-Deklarationen }
public
{ Public-Deklarationen }
function QueryService(
const rsid, iid: TGuid;
out Obj): HResult;
stdcall;
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.Button1Click(Sender: TObject);
begin
Webbrowser1.Navigate('
http://www.delphipraxis.net');
end;
function TForm1.QueryService(
const rsid, iid: TGuid;
out Obj): HResult;
stdcall;
begin
Caption := '
Query';
// Wird nie Aufgerufen
end;
procedure TForm1.WebBrowser1DocumentComplete(Sender: TObject;
const pDisp: IDispatch;
var URL: OleVariant);
begin
(Webbrowser1.Document
as IHTMLDocument2).designMode := '
on';
end;
end.