hi,
I want to show a website in a form. I am working with Lazarus for windows.
The following code creates an Internet Explorer object, and place it on a form. The object is descripted here:
http://msdn.microsoft.com/en-us/library/aa752084%28v=vs.85%29.aspxMy problem is that the Internet Explorer scrollbars, captions and buttons is visible.
The only way to fix that is to set FullScreen to True but then the object can't be resized
I want to make the buttons and stuff disappear AND make the object resizeable - any ideas?!
Should I use the WebBrowser Object instead:
http://msdn.microsoft.com/en-us/library/aa752085%28v=VS.85%29.aspx#3unit Unit1;
{$mode objfpc}{$H+}
interface
uses
Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, ExtCtrls,
Comobj, windows;
type
{ TForm1 }
TForm1 = class(TForm)
Panel1: TPanel;
procedure FormCreate(Sender: TObject);
procedure FormResize(Sender: TObject);
private
{ private declarations }
browser: olevariant;
public
{ public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.lfm}
{ TForm1 }
procedure TForm1.FormCreate(Sender: TObject);
var
s:variant;
begin
panel1.align:=alClient;
browser := CreateOleObject('InternetExplorer.Application');
windows.setparent(browser.hwnd, panel1.handle);
browser.toolbar:=true;
browser.fullscreen:=false; //browser.fullscreen:=true;
browser.Resizable:=true;
browser.visible:=true;
s:='
http://www.microsoft.com';
Browser.Navigate(s);
end;
procedure TForm1.FormResize(Sender: TObject);
begin
browser.width:=clientWidth;
browser.height:=clientHeight;
end;
end.