Link to home
Start Free TrialLog in
Avatar of foxjax
foxjax

asked on

TWebBrowser??

I just updated to Delphi 4 standard (from Delphi 2) and am trying out a few things with it.

I saw a short article on the web about adding in the Microsoft Internet Controls so i followed the instructions and now have two new components:

WebBrowser_V11:TWebBrowser_V1
WebBrowser1:TWebBrowser

My problem:

(1) I understand that the TWebBrowser can be used for displaying web pages, etc but what is the other component and the limitations of both of them (ie: can i display html files which contains javascript, graphics, etc?)

(2) Can anyone show me how to use the TWebBrowser to do such things as load html files from disk, display scroll bar if required only, etc.

I am completely new to this.





Avatar of h_mohsenian
h_mohsenian

listening ...  :-)


( just say : you can Call IE from your Delphi App that means you can write your HTML file by Delphi App then call IE by this procedure : )


procedure OpenInternetExplorer( sURL : string );
const
  csOLEObjName = 'InternetExplorer.Application';
var
  IE        : Variant;
  WinHanlde : HWnd;
begin
  if( VarIsEmpty( IE ) )then
  begin
    IE := CreateOleObject( csOLEObjName );
    IE.Visible := true;
    IE.Navigate( sURL );
  end else
  begin
    WinHanlde := FindWIndow( 'IEFrame', nil );
    if( 0 <> WinHanlde )then
    begin
      IE.Navigate( sURL );
      SetForegroundWindow( WinHanlde );
    end else
    begin
      // handle error ...
    end;
  end;
end;


best regards
hamed
also you can see an standard Delhi demo about your need :

see Delphix\Demos\coolstuf\webbrows

i think it is an complete Demo App for TWebBrowse. although I never saw him until now that I search !;-)

best regards
hamed
ops . i told him instead of it ;-)
ASKER CERTIFIED SOLUTION
Avatar of edey
edey

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial