This is because either the multipage tif pages are loading very quickly, or the progressbar is not being refreshed to show the change. One way you can control this by doing this:
procedure TForm1.ImageEnMView1Progress(Sender: TObject; per: Integer);
begin
// Make sure ProgressBar1.Max is 100 before loading the file
// Set the progressbar position
ProgressBar1.Position := per;
// Without this the progress may be too fast to see progress bar changes visually
// Adjust this sleep time to control the speed of loading
Sleep(500);
// Update the progressbar
Application.ProcessMessages;
end;
procedure TForm1.ImageEnMView1FinishWork(Sender: TObject);
begin
//Themed progressbars may not be refreshed fully as the progress nears completion. This can be improved by using this code or by using a third party progressbar:
ProgressBar1.Position := 100-1;
ProgressBar1.Position := 100;
ProgressBar1.Position := 100-1;
Sleep(500);
ProgressBar1.Position := 0;
end;
Another but much more difficult way is to update the progressbar in a thread.
William Miller
Email: w2m@frontiernet.net
EBook: http://www.imageen.com/ebook/
Apprehend: http://www.frontiernet.net/~w2m/index.html