unit usoporteusuarios;

{$mode delphi}{$H+}

interface

uses
  Classes, SysUtils, FileUtil, activexcontainer, Forms, Controls, Graphics,
  Dialogs, StdCtrls, ComCtrls, ExtCtrls, SHDocVw_1_1_TLB;

type

  { TForm1 }

  TForm1 = class(TForm)
    ActiveXContainer1: TActiveXContainer;
    statusbar: TStatusBar;
    Timer: TTimer;
    procedure FormCreate(Sender: TObject);
    procedure TimerTimer(Sender: TObject);
  private
    { private declarations }
    procedure OnStatusTextChange(Sender: TObject; Text_: WideString);
  public
    { public declarations }
  end;

var
  Form1: TForm1;

implementation

{$R *.lfm}


var
  Browser: TEvsWebBrowser;

{ TForm1 }

procedure TForm1.FormCreate(Sender: TObject);
begin
  Browser := TEvsWebBrowser.Create(Self);
  ActiveXContainer1.ComServer := Browser.ComServer;
  ActiveXContainer1.Active := True;
  Browser.OnStatusTextChange := OnStatusTextChange;
end;

procedure TForm1.TimerTimer(Sender: TObject);
var
  url, onull: olevariant;
begin
  timer.Enabled := False;
  url := Utf8decode('http://simsee.org/soporte');
  onull := NULL;
  Browser.ComServer.Navigate2(url, onull, onull, onull, onull);
end;

procedure TForm1.OnStatusTextChange(Sender: TObject; Text_: WideString);
begin
  statusbar.SimpleText := UTF8Encode(Text_);
end;

end.

