🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #15185

Re: The Resolution of OnProgress Event in TGraphic::LoadFromFile

#15185
From: Remy Lebeau (TeamB)
Date: Fri, 18 Jul 2003 04:14
28 lines
2356 bytes
"Phuoc Can HUA" <home}a+t{huaonline.com> wrote in message
news:oprshf7zwybq7az6@newsgroups.borland.com...
> Does anyone know the resolution of OnProgress event of TGraphic?

In regards to what exactly?  Please clearify.

> I'm using TJPEGImage::LoadFromFile in a TThread.
> It seems that when a large image is loading it's still
> holding another process, a routine in TTimer(50ms).
> Maybe TTimer stops 'firing' while image loading(?)
> I'm thinking to use OnProgress (during loading only).
> Do you think the resolution will be good enough?

The OnProgress event does not use a timer.  Are you referring to your own
timer being hung up?  That is very likely as TTimer uses messages and thus
requires the message queue to continue being pumped for new messages often,
which would not be the case during a loading operation in the same thread as
the timer.  If your loading is slowing things down too much, you should
consider moving the loading operation into a thread all of its own.  If that
is already the case, then there is no reason for loading the image to stop a
TTImer in another thread including the main VCL thread.  It should also be
noted that, although I do not know about TJPEGImage itself, none of the
other native TGraphic classes trigger the OnProgress event at all, as far as
I can see from the VCL source.


Gambit
Technical Details
Message-ID: <3f1772ea$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-09!supernews.com!diablo.theplanet.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <oprshf7zwybq7az6@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10cc67,ad3c45c445bebc88
X-Google-Attributes: gid10cc67,public
X-Google-ArrivalTime: 2003-07-17 21:39:24 PST
From: "Remy Lebeau \(TeamB\)" <gambit47@yahoo.com>
Newsgroups: borland.public.cppbuilder.nativeapi
References: <oprshf7zwybq7az6@newsgroups.borland.com>
Subject: Re: The Resolution of OnProgress Event in TGraphic::LoadFromFile
Date: Thu, 17 Jul 2003 21:14:34 -0700
Lines: 30
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
NNTP-Posting-Host: 207.175.226.26
Message-ID: <3f1772ea$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1058501354 207.175.226.26 (17 Jul 2003 21:09:14 -0700)
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-09!supernews.com!diablo.theplanet.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail