Código Delphi
[-]
Application.ProcessMessages;
if not ExisteFrm(Frminformacion) then
frminformacion := tfrminformacion.Create('Buscando Facturas de Importe menor a: 2 € :P',
'',
oShowProgress,
query1.RecordCount);
try
Frminformacion.Info(objFactura.NFactura); Frminformacion.StepIt; finally
FreeAndNil(Frminformacion);
end;
Y la forma frmInformacion:
Código Delphi
[-]
constructor TFrminformacion.Create(const Titulo: String; const informacion: String;
const Opciones: TOptions = []; const MaxProgressValue:Integer = 100);
begin
inherited Create(NIL);
lblTitulo.Caption := Titulo;
lblinformacion.Caption := informacion;
pnlCancel.Visible := (oShowCancel in Opciones);
pnlProgress.Visible := (oShowProgress in Opciones);
Progessbar1.Max :=MaxProgressValue;
Self.AutoSize := True;
Show;
Update;
end;
La forma no es Modal, porque entonces el programa se queda esperando en esta ventana, y el código que debe ejecutarse ¡¡no se ejecuta!!
La ventana FrmInformacion tiene el estilo fsStayOnTop, y la ventana que queda por detrás, suelo inhabilitarla (FormX.Enabled := false)
Creo que ahora si se entiende mucho mejor.
Saludos