 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Joćo Pereira Guest
|
Posted: Mon Oct 27, 2003 3:25 pm Post subject: Using TGraphic::OnProgress event |
|
|
I'm trying to use this event but i really don't know how.
My objective is while a image is loading in a new form, get a message saying
that the image is loading and a progess bar, after the image is loaded,
it'll disapear.
I think that is with onprogress event.
Can anyone help me with this issue?
Thx in advance
Joćo Pereira
|
|
| Back to top |
|
 |
Mark Sharim Guest
|
Posted: Mon Oct 27, 2003 11:30 pm Post subject: Re: Using TGraphic::OnProgress event |
|
|
Not being an expert, one thing I've learnt is "making your
application breath". With this I mean, when you launch an event
it requries you to inform your users how far the progress
is -> use Application->ProcessMessages();
For a Progressbar that would mean if your Image is performing
a task the progressbar could progress by:
if (ProgressBar1->Position == //max position){
ProgressBar1->Position = 0;
}
else
{
ProgressBar1->Position = ProgressBar1->Position +1;
ProgressBar1->Step = 1;
}
Application->ProcessMessages();
Just an example, I never figured out what the OnProgress event could do but this is just an example to maybe get you started.
Good luck!
Mark
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|