Article View: borland.public.cppbuilder.internet.socket
Article #4296Declaring Thread Variable
From: mehmed sipahi
Date: Thu, 03 Mar 2005 16:01
Date: Thu, 03 Mar 2005 16:01
21 lines
1703 bytes
1703 bytes
How I can create variable in a thread for access other functions.I mean;
_fastcall MyThreadClass::MyThreadClass(bool CreateSuspended)
: TThread(CreateSuspended)
{
//Declare timer Object
TTimer *timer;
timer=new TTimer(MainForm);
}
//---------------------------------------------------------------------------
void __fastcall MyThreadClass::Execute()
{
timer->Enabled=false;
}
When I compile Cmpiler dosent give error.But when I run the program it comes
"timer->Enabled=false" didn't work.BEcause timer is NULL..but why??how
should i declare the timer object??
Thanks
Technical Details
Message-ID:
<422734e0$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!newshub.sdsu.edu!border1.nntp.dca.giganews.com!nf3.bellglobal.com!border2.nntp.dca.giganews.com!nntp.giganews.com!newspeer1.nwr.nac.net!news-out.newsgroups.com!propagator2-sterling.newsfeeds.com!news-in.nuthinbutnews.com!news-in.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Thread: 11508e,1d5055ad12bdddd7,start X-Google-Attributes: gid11508e,public X-Google-Language: ENGLISH,ASCII-7-bit Reply-To: "mehmed sipahi" <furkan.atli@mobinex.com.tr> From: "mehmed sipahi" <furkan.atli@mobinex.com.tr> Newsgroups: borland.public.cppbuilder.internet.socket Subject: Declaring Thread Variable Date: Thu, 3 Mar 2005 18:01:36 +0200 Lines: 23 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: 193.140.214.69 Message-ID: <422734e0$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1109865696 193.140.214.69 (3 Mar 2005 08:01:36 -0800) Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!newshub.sdsu.edu!border1.nntp.dca.giganews.com!nf3.bellglobal.com!border2.nntp.dca.giganews.com!nntp.giganews.com!newspeer1.nwr.nac.net!news-out.newsgroups.com!propagator2-sterling.newsfeeds.com!news-in.nuthinbutnews.com!news-in.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mail