BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Using TGraphic::OnProgress event

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder (Graphics)
View previous topic :: View next topic  
Author Message
Joćo Pereira
Guest





PostPosted: Mon Oct 27, 2003 3:25 pm    Post subject: Using TGraphic::OnProgress event Reply with quote



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





PostPosted: Mon Oct 27, 2003 11:30 pm    Post subject: Re: Using TGraphic::OnProgress event Reply with quote




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
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder (Graphics) All times are GMT
Page 1 of 1

 
Jump to:  
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


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.