unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, OleCtrls, SHDocVw, StdCtrls;
type
TForm1 =
class(TForm)
Button1: TButton;
WebBrowser1: TWebBrowser;
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
{$Resource HTMLs.res}
// um html aus Res in Webbrowser zu laden brauche ich eine Fuktion
procedure TForm1.LoadvonRessource(htmls:
string);
var
Adress:
string;
index:
array[0..255]
of Char;
begin
GetModuleFileName(hInstance,
index, SizeOf(
index));
Adress:='
res://' + StrPas(
index) + '
/RT_HTML/'+HTMLS;
WebBrowser1.Navigate(Adress);
end;
procedure TForm1.Button1Click(Sender: TObject);
begin
Webbrowser1.navigate(adress);
//Webbrowser1.navigate('index.htm');
end;
end.