Solved

Q. How do you start 2 or more other classes to threading from a single Form1??

Posted on 2004-08-26
2
233 Views
Last Modified: 2010-04-15
Q. How do you start 2 or more other classes to threading from a single Form1??

I tried this code on Form1 (Form1_Load) but if failed...

objClass1 = new Class1();
objClass1 = new Thread(new ThreadStart(StartMoveKing));
      
 // also

objClass2 = new Class2();
objClass2 = Thread(new ThreadStart(StartMoveQueen));
0
Comment
Question by:kvnsdr
  • 2
2 Comments
 
LVL 3

Expert Comment

by:gillgates
Comment Utility
using System.Threading;

Class1 objClass1;
Thread t;

objClass1 = new Class1();
t = new Thread(new ThreadStart(objClass1.YourFunc));
t.Start();
0
 
LVL 3

Accepted Solution

by:
gillgates earned 250 total points
Comment Utility
using System.Threading;

Class1 objClass1;
Class2 objClass2;
Thread t1;
Thread t2;

objClass1 = new Class1();
t1 = new Thread(new ThreadStart(objClass1.StartMoveKing));
t1.Start();

objClass2 = new Class2();
t2 = Thread(new ThreadStart(StartMoveQueen));
t2.Start();
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Article by: Najam
Having new technologies does not mean they will completely replace old components.  Recently I had to create WCF that will be called by VB6 component.  Here I will describe what steps one should follow while doing so, please feel free to post any qu…
Introduction Hi all and welcome to my first article on Experts Exchange. A while ago, someone asked me if i could do some tutorials on object oriented programming. I decided to do them on C#. Now you may ask me, why's that? Well, one of the re…
This video discusses moving either the default database or any database to a new volume.
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now