Click here to Skip to main content
15,922,533 members
Home / Discussions / C#
   

C#

 
AnswerRe: how to embed word in windows form Pin
Bert delaVega17-Jul-07 4:14
Bert delaVega17-Jul-07 4:14 
AnswerRe: how to embed word in windows form Pin
Dan Neely17-Jul-07 4:58
Dan Neely17-Jul-07 4:58 
GeneralRe: how to embed word in windows form Pin
lockepeak17-Jul-07 20:32
lockepeak17-Jul-07 20:32 
QuestionChanging the background Pin
razanabanu17-Jul-07 2:33
razanabanu17-Jul-07 2:33 
AnswerRe: Changing the background Pin
Malcolm Smart17-Jul-07 3:05
Malcolm Smart17-Jul-07 3:05 
AnswerRe: Changing the background Pin
Vasudevan Deepak Kumar17-Jul-07 4:41
Vasudevan Deepak Kumar17-Jul-07 4:41 
QuestionThreading ??? Pin
Software_Specialist17-Jul-07 2:31
Software_Specialist17-Jul-07 2:31 
AnswerRe: Threading ??? Pin
originSH17-Jul-07 2:41
originSH17-Jul-07 2:41 
For windows forms in .net 2.0 you can use the BackgroundWorker[^] control. You place it on the form and then put your code into the Do Work event.

If you need to do this in .Net 1.1 or outside of win forms then you can use the Thread Class[^] directly.

To do this you make a new method which takes no parameters and has no return value:

private void TestThread()
{
//DO STUFF
}

Then you create a new thread and start it:

System.Threading.Thread testThread = new System.Threading.Thread(new System.Threading.ThreadStart(this.TestThread));
testThread.Start();

You can also pass things to the thread but I'll leave that for you to read up on Wink | ;)

One last thing to note, if you are working with windows forms then you'll need to use the Invoke method on any controls you access across threads.

http://www.codeproject.com/csharp/threadsafeforms.asp[^]
GeneralRe: Threading ??? Pin
Software_Specialist17-Jul-07 3:31
Software_Specialist17-Jul-07 3:31 
GeneralRe: Threading ??? Pin
Bekjong17-Jul-07 3:46
Bekjong17-Jul-07 3:46 
GeneralRe: Threading ??? Pin
Software_Specialist17-Jul-07 4:20
Software_Specialist17-Jul-07 4:20 
GeneralRe: Threading ??? Pin
Bekjong17-Jul-07 4:48
Bekjong17-Jul-07 4:48 
GeneralRe: Threading ??? Pin
Russell Jones17-Jul-07 5:02
Russell Jones17-Jul-07 5:02 
QuestionCould yous give some idea ? Pin
LyBun17-Jul-07 2:31
LyBun17-Jul-07 2:31 
AnswerRe: Could yous give some idea ? Pin
Malcolm Smart17-Jul-07 2:56
Malcolm Smart17-Jul-07 2:56 
AnswerRe: Could yous give some idea ? Pin
Colin Angus Mackay17-Jul-07 3:10
Colin Angus Mackay17-Jul-07 3:10 
QuestionDouble row in TreeView or ListView Pin
Andrea_8617-Jul-07 1:51
Andrea_8617-Jul-07 1:51 
AnswerRe: Double row in TreeView or ListView Pin
m@u17-Jul-07 2:06
m@u17-Jul-07 2:06 
GeneralRe: Double row in TreeView or ListView Pin
Andrea_8617-Jul-07 6:14
Andrea_8617-Jul-07 6:14 
QuestionMSMQ Error Handling Pin
ramdil17-Jul-07 1:38
ramdil17-Jul-07 1:38 
AnswerRe: MSMQ Error Handling Pin
Jimmanuel17-Jul-07 3:55
Jimmanuel17-Jul-07 3:55 
GeneralRe: MSMQ Error Handling Pin
ramdil17-Jul-07 4:24
ramdil17-Jul-07 4:24 
GeneralRe: MSMQ Error Handling Pin
Jimmanuel17-Jul-07 4:35
Jimmanuel17-Jul-07 4:35 
GeneralRe: MSMQ Error Handling Pin
ramdil17-Jul-07 5:35
ramdil17-Jul-07 5:35 
GeneralRe: MSMQ Error Handling Pin
Jimmanuel17-Jul-07 6:10
Jimmanuel17-Jul-07 6:10 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.