🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Animation with TThread in non client area (border form)

#4577
From: Carlos
Date: Thu, 12 Jan 2006 19:24
29 lines
1892 bytes
I don�t understand.

This code works but I am receiving a flicker for any draws.

How could I draw in DC of Mainform in a safe manner ?

Regards

"Remy Lebeau (TeamB)" <no.spam@no.spam.com> escribi� en el mensaje 
news:43c2b613$1@newsgroups.borland.com...
>
> "Carlos" <a@a.com> wrote in message 
> news:43c29a01@newsgroups.borland.com...
>
>> I created an animation with TThread class.
>
> That code is not thread-safe at all.  You are accessing the MainForm in an
> unsafe manner.  You need to use the thread's Synchronize() method when
> objects of the main thread.
>
> Also, there is nothing in that thead code that can't be done in the main
> thread directly.  The thread is not helping you at all, so you should get
> rid of the thread altogether and use a simple timer instead to handle your
> animation.
>
>
> Gambit
>
> 
Technical Details
Message-ID: <43c6ac4c@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!nx01.iad01.newshosting.com!newshosting.com!news-out.newsfeeds.com!propagator2-sterling.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mail
References: <43c29a01@newsgroups.borland.com> <43c2b613$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,7abd13b8dc24dd8a
X-Google-Attributes: gid10cc67,public
X-Google-Language: ENGLISH,ASCII
From: "Carlos" <a@a.com>
Newsgroups: borland.public.cppbuilder.nativeapi
References: <43c29a01@newsgroups.borland.com> <43c2b613$1@newsgroups.borland.com>
Subject: Re: Animation with TThread in non client area (border form)
Date: Thu, 12 Jan 2006 20:24:17 +0100
Lines: 31
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
X-RFC2646: Format=Flowed; Original
NNTP-Posting-Host: 80.38.17.40
Message-ID: <43c6ac4c@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1137093708 80.38.17.40 (12 Jan 2006 11:21:48 -0700)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!nx01.iad01.newshosting.com!newshosting.com!news-out.newsfeeds.com!propagator2-sterling.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mail