Lost Password?


  #1 (permalink)  
Old 07-18-2006, 02:51 PM
Lop's Avatar   
Lop Lop is offline
Speaks fluent binary
 
Join Date: May 2006
Posts: 1,149
Rep Power: 18
Lop will become famous soon enoughLop will become famous soon enough
Default Creating a Thread

I am working on a project and need to know how to create a thread in Managed C++ using VS 2005. I have tutorials but none of them work (from google and MSDN). Can anyone show me the correct code?
__________________
Lop
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

Sponsored Links
  #2 (permalink)  
Old 07-19-2006, 08:29 PM
Lop's Avatar   
Lop Lop is offline
Speaks fluent binary
 
Join Date: May 2006
Posts: 1,149
Rep Power: 18
Lop will become famous soon enoughLop will become famous soon enough
Default

Anyone?
__________________
Lop
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 07-20-2006, 09:07 AM
smith smith is offline
Programmer
 
Join Date: Jun 2006
Posts: 108
Rep Power: 9
smith is on a distinguished road
Default

Declare this globally (or local but you'll have no control over it)

Code:
private: Threading::Thread^ myThread;
Then execute your thread like
Code:
Threading::ThreadStart^ threadStart = 
gcnew Threading::ThreadStart(this,&yourClass::Form1::Function);
myThread = gcnew Threading::Thread(threadStart);
myThread->Start();
you need to change what I have bolded above (yourClass,Form1 and Function) to match your program.
__________________
Code:
for (int i;;) {
   cout << "Smith";
}
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
I need the thread to multitask. Lawtonfogle Java Help 1 05-31-2007 11:14 AM
thread problem dirkfirst C# Programming 9 01-15-2007 10:19 AM
Creating an analog clock with ActionScript AfTriX Tutorials 2 01-07-2007 03:19 AM
Which Thread do Timers run on? NeedHelp C# Programming 3 07-17-2006 04:22 PM
The UI Thread NeedHelp C# Programming 1 07-12-2006 10:47 PM


All times are GMT -5. The time now is 05:28 PM.

Contest Stats

WingedPanther ........ 2753.6
Xav ........ 2704
Brandon W ........ 1702.32
John ........ 1207.73
marwex89 ........ 1175.24
morefood2001 ........ 966.05
dcs ........ 655.75
Steve.L ........ 475.59
orjan ........ 418.58
Aereshaa ........ 383.54

Contest Rules

CodeCall Goal

Goal: 100,000 Posts
Complete: 100%


Complete - Celebrate!

Ads