Hi guys,
I have an app that only have one form which is main form.
On this form there is a progress bar.
The app idea are :
1. Run a database quary
2. Process result from the query
3. Step the progress bar for operation no 1 & 2.
4. Terminate app when all process done.
Codes are something like these ;
procedure TMainFrm.FormShow(Sender: TObject);
begin
P.Position:= 0; // P is a progress bar
OpenDb();
Q.Open(); // Q is TIBQuery
Q.Last;
Q.First;
P.Max := Q.RecordCount;
while not(Q.EOF) do
begin
//do some process
P.StepIt;
application.ProcessMessages;
Q.Next
end;
application.Terminate;
end;
The app runs OK, but couldn't see progress bar because the form wasn't show.