unit uFormVerDoc;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, uverdoc, ExtCtrls;

type
  TmainForm = class(TForm)
    Timer1: TTimer;
    procedure Timer1Timer(Sender: TObject);
    procedure FormCreate(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  mainForm: TmainForm;

implementation

{$R *.dfm}

procedure TmainForm.Timer1Timer(Sender: TObject);
var
  topico, titulo, marcador: String;
begin
  Timer1.Interval:= 0;
  try
  begin
    if ParamCount >= 1 then
    begin
      topico:= ParamStr(1);
      if ParamCount >= 2 then
      begin
        titulo:= ParamStr(2);
        Application.Title:= titulo;
        if ParamCount >= 3 then
          marcador:= ParamStr(3)
        else
          marcador:= '';
      end
      else
      begin
        Application.Title:= topico;
        titulo:= '';
        marcador:= '';
      end;

      uverdoc.verdoc( topico, titulo, marcador);
    end
    else
      raise Exception.Create('Falta el tópico a consultar');
  end
  finally
    Timer1.Interval:= 0;
    self.Close;
  end;
end;

procedure TmainForm.FormCreate(Sender: TObject);
begin
  self.Visible:= false;
  self.Top:= Screen.Height +1;
  self.Left:= Screen.Width +1;
end;

end.
