Ver Mensaje Individual
  #37  
Antiguo 02-06-2013
Avatar de José Luis Garcí
[José Luis Garcí] José Luis Garcí is offline
Miembro Premium
 
Registrado: may 2003
Ubicación: Las Palmas de G.C.
Posts: 1.372
Reputación: 22
José Luis Garcí Va camino a la fama
Aquí la imagen del modulo necesario para la función ErrorX



y el código del módulo

Código Delphi [-]
unit UErrores;

interface

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

type
  TFError = class(TForm)
    Panel1: TPanel;
    Image1: TImage;
    Label1: TLabel;
    LabeledEdit1: TLabeledEdit;
    LabeledEdit2: TLabeledEdit;
    LabeledEdit3: TLabeledEdit;
    Label2: TLabel;
    Timer1: TTimer;
    Memo1: TMemo;
    LabeledEdit4: TLabeledEdit;
    Label3: TLabel;
    Memo2: TMemo;
    Panel2: TPanel;
    SpeedButton1: TSpeedButton;
    SpeedButton2: TSpeedButton;
    procedure Timer1Timer(Sender: TObject);
    procedure FormActivate(Sender: TObject);
    procedure FormClose(Sender: TObject; var Action: TCloseAction);
    procedure SpeedButton2Click(Sender: TObject);
    procedure SpeedButton1Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
    var VarSFErrorResult:string;
  end;

var
  FError: TFError;

implementation

{$R *.dfm}

procedure TFError.FormActivate(Sender: TObject);
//------------------------------------------------------------------------------
//******************************************[ Al Activarse ]*******
//------------------------------------------------------------------------------
begin
  if Timer1.Enabled=false then Timer1.Enabled:=True;
end;

procedure TFError.FormClose(Sender: TObject; var Action: TCloseAction);
//------------------------------------------------------------------------------
//*******************************************[ Al Cerrarse ]*******
//------------------------------------------------------------------------------
begin
  if VarSFErrorResult='' then VarSFErrorResult:='Omisión';
  if Timer1.Enabled=true then Timer1.Enabled:=False;
  if Image1.Visible=false then Image1.Visible:=True;
  if Label1.Visible=False then Label1.Visible:=True;
end;

procedure TFError.SpeedButton1Click(Sender: TObject);
//------------------------------------------------------------------------------
//************************************************[ Salir ]*******
//------------------------------------------------------------------------------
begin
  VarSFErrorResult:='Salir';
  Close;
end;

procedure TFError.SpeedButton2Click(Sender: TObject);
//------------------------------------------------------------------------------
//********************************************[ Continuar ]*******
//------------------------------------------------------------------------------
begin
 VarSFErrorResult:='Continuar';
 Close;
end;

procedure TFError.Timer1Timer(Sender: TObject);
//------------------------------------------------------------------------------
//***********************************************[ Timer ]*******
//------------------------------------------------------------------------------
begin
    if Image1.Visible=true then
    begin
          Image1.Visible:=False;
          Label1.Visible:=True;
    end else
    begin
          Image1.Visible:=True;
          Label1.Visible:=False
    end;
end;

end.
__________________
Un saludo desde Canarias, "El abuelo Cebolleta"
Responder Con Cita