Article View: borland.public.cppbuilder.nativeapi
Article #4502Re: Animation with TThread in non client area (border form)
From: Remy Lebeau (TeamB)
Date: Tue, 17 Jan 2006 20:27
Date: Tue, 17 Jan 2006 20:27
23 lines
1827 bytes
1827 bytes
"Carlos" <a@a.com> wrote in message news:43ca7789@newsgroups.borland.com... > The problem is that this thread is for use in actions like: > > start thread > ADOQuery->Open(); > stop thread Again, I STRONGLY advise you NOT to use a thread for your animation. The code you have shown is NOT thread-safe, and the drawing code DOES NOT benefit from being in a thread to begin with. > If I use a timer the animation do not start until ADOQuery is opened. Then I suggest you not perform your database operations in the context of the main thread to begin with. Rather than moving your animation into its own thread, move your database code to its own thread instead. The main thread will then be free to do whatever GUI operations you want while the database is busy. Gambit
Technical Details
Message-ID:
<43cd529f@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news4.google.com!newshub.sdsu.edu!peer01.west.cox.net!cox.net!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mailReferences:
<43c29a01@newsgroups.borland.com> <43c2b613$1@newsgroups.borland.com> <43c6ac4c@newsgroups.borland.com> <43c6b80f$1@newsgroups.borland.com> <43ca7789@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,7abd13b8dc24dd8a X-Google-Attributes: gid10cc67,public X-Google-Language: ENGLISH,ASCII-7-bit From: "Remy Lebeau \(TeamB\)" <no.spam@no.spam.com> Newsgroups: borland.public.cppbuilder.nativeapi References: <43c29a01@newsgroups.borland.com> <43c2b613$1@newsgroups.borland.com> <43c6ac4c@newsgroups.borland.com> <43c6b80f$1@newsgroups.borland.com> <43ca7789@newsgroups.borland.com> Subject: Re: Animation with TThread in non client area (border form) Date: Tue, 17 Jan 2006 12:27:56 -0800 Lines: 25 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1409 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409 NNTP-Posting-Host: 68.69.17.41 Message-ID: <43cd529f@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1137529503 68.69.17.41 (17 Jan 2006 12:25:03 -0700) Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news4.google.com!newshub.sdsu.edu!peer01.west.cox.net!cox.net!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail