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
public
var VarSFErrorResult:string;
end;
var
FError: TFError;
implementation
{$R *.dfm}
procedure TFError.FormActivate(Sender: TObject);
begin
if Timer1.Enabled=false then Timer1.Enabled:=True;
end;
procedure TFError.FormClose(Sender: TObject; var Action: TCloseAction);
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);
begin
VarSFErrorResult:='Salir';
Close;
end;
procedure TFError.SpeedButton2Click(Sender: TObject);
begin
VarSFErrorResult:='Continuar';
Close;
end;
procedure TFError.Timer1Timer(Sender: TObject);
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.