Posted on 2005-04-11
Hello, I have this issue. A form that runs only a progress bar (until now, just only a for loop to test it), that is going to do a sincronization task. The form is declared with these properties values: BorderStyle = bsDialog or bsToolWindow, Position = poDesktopCenter, BorderIcons = . The rest remains default.
This form is execute with showmodal in the ButtonCloseClick event of the main form of the application.
The only code it has in is this:
procedure TfrmSincronizationTask.FormActivate(Sender: TObject);
var i: integer;
for i := 0 to pgSincronization.Max do
ModalResult := mrOk;
The form is called in this way:
frmSincronizationTask := TfrmSincronizationTask.Create(Application);
frmSincronizationTask := nil;
What i need is the form closing automatically when the task is finished, but it don't.
I will appreciate some help
Thanks you in advance,