Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Create TWebBrowser and make it visible inside a form 1

Status
Not open for further replies.

michaenh

Programmer
Aug 7, 2002
205
NO
Hi everyone.. :eek:)

I wounder how to make a created component visible inside my Form.

Ex. of a created TWebBrowser:

procedure TForm1.Button1Click(Sender: TObject);
var
WB: TWebBrowser;
begin
WB := TWebBrowser.Create(Self);

if IsWindowVisible( WB.Handle ) then
begin
WB.Top := 200;
WB.Left := 300;
WB.Navigate(' end;
end;

This make it visible on the screen but outside my form.

Any is help great!

Many thanks in advance... :eek:)

Merry Christmas to you all...

Michael
 
normally to make a component visible you need

WB.Parent := Self; // or the control you want to place on

regards
Rod
 
Thanks Rod.

A simple use of InsertControl...

procedure TForm1.Button1Click(Sender: TObject);
var
WB: TWebBrowser;
begin
WB := TWebBrowser.Create(Self);

Form1.InsertControl(WB);
WB.Align := alClient;
WB.Navigate('end;

Jippii!! :eek:)

Michael
 
hi wyjkmsc.

It would work.. :eek:)

THanks everyone.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top