Want to embed Internet Explorer within an MDI Child

HELP...

I want to embed Internet Explorer within an MDIChild form within Delphi, and I have the following code, not that i want to create a browser application, there are already several good ones out there, i just want to know how it is done. I have seen several such as the AVANT browser that has MDI forms, or Mozilla but that one is a tab. I want to know how i can hook the Internet Explorer parent into the parent of the MDI form. Please Help, much appreciated :)

var
ie: IWebbrowser2;
...
ie := CoInternetExplorer.Create;
...
//this part does not work
//TControl(ie).Parent = Form1;
//nor
//TWinControl(ie).Parent = Form1;
...
ie.Visible := true
ie.ie.Navigate('http://www.google.com.ph', x, x, x, x);


Comments

  • : HELP...
    :
    : I want to embed Internet Explorer within an MDIChild form within Delphi, and I have the following code, not that i want to create a browser application, there are already several good ones out there, i just want to know how it is done. I have seen several such as the AVANT browser that has MDI forms, or Mozilla but that one is a tab. I want to know how i can hook the Internet Explorer parent into the parent of the MDI form. Please Help, much appreciated :)
    :
    : var
    : ie: IWebbrowser2;
    : ...
    : ie := CoInternetExplorer.Create;
    : ...
    : //this part does not work
    : //TControl(ie).Parent = Form1;
    : //nor
    : //TWinControl(ie).Parent = Form1;
    : ...
    : ie.Visible := true
    : ie.ie.Navigate('http://www.google.com.ph', x, x, x, x);
    :
    :
    :
    Why not place the TWebBrowser component onto the MDI child form? It is a component, which provides access to that the IWebbrowser2. Here is an example code to do it during runtime:
    [code]
    IE := TWebBrowser.Create(Self);
    IE.Parent := Self.
    IE.Navigate('http://www.google.com.ph');
    [/code]
    You can also find the TWebBrowser component in the Internet page of the Component Palette.
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

In this Discussion