Click here to Skip to main content
15,896,063 members
Home / Discussions / C#
   

C#

 
GeneralRe: Very simple ProgressBar Pin
nelsonpaixao30-Sep-08 15:06
nelsonpaixao30-Sep-08 15:06 
AnswerRe: Very simple ProgressBar Pin
blackjack215030-Sep-08 22:46
blackjack215030-Sep-08 22:46 
QuestionHow to draw a line outside of onPaint event handler? Pin
amin_dorost30-Sep-08 11:08
amin_dorost30-Sep-08 11:08 
AnswerRe: How to draw a line outside of onPaint event handler? Pin
DaveyM6930-Sep-08 11:18
professionalDaveyM6930-Sep-08 11:18 
AnswerRe: How to draw a line outside of onPaint event handler? Pin
Guffa1-Oct-08 1:10
Guffa1-Oct-08 1:10 
GeneralRe: How to draw a line outside of onPaint event handler? Pin
DaveyM691-Oct-08 1:54
professionalDaveyM691-Oct-08 1:54 
GeneralRe: How to draw a line outside of onPaint event handler? Pin
Guffa1-Oct-08 2:58
Guffa1-Oct-08 2:58 
QuestionEventargs click event runtime created labels Pin
RobScripta30-Sep-08 9:37
professionalRobScripta30-Sep-08 9:37 
AnswerRe: Eventargs click event runtime created labels Pin
Wendelius30-Sep-08 9:42
mentorWendelius30-Sep-08 9:42 
GeneralRe: Eventargs click event runtime created labels Pin
Mbah Dhaim30-Sep-08 10:15
Mbah Dhaim30-Sep-08 10:15 
GeneralRe: Eventargs click event runtime created labels Pin
RobScripta30-Sep-08 10:38
professionalRobScripta30-Sep-08 10:38 
GeneralRe: Eventargs click event runtime created labels Pin
Dan Neely30-Sep-08 10:52
Dan Neely30-Sep-08 10:52 
GeneralRe: Eventargs click event runtime created labels Pin
Mycroft Holmes30-Sep-08 22:58
professionalMycroft Holmes30-Sep-08 22:58 
GeneralRe: Eventargs click event runtime created labels Pin
DaveyM691-Oct-08 2:05
professionalDaveyM691-Oct-08 2:05 
QuestionHow store formatted text [modified] Pin
sepel30-Sep-08 9:05
sepel30-Sep-08 9:05 
AnswerRe: How store formatted text Pin
User 665830-Sep-08 10:07
User 665830-Sep-08 10:07 
QuestionRecording Voice from microphone Pin
Ha ha ha ha ha ha ha ha30-Sep-08 8:12
Ha ha ha ha ha ha ha ha30-Sep-08 8:12 
AnswerRe: Recording Voice from microphone Pin
Mbah Dhaim30-Sep-08 10:29
Mbah Dhaim30-Sep-08 10:29 
GeneralRe: Recording Voice from microphone Pin
Ha ha ha ha ha ha ha ha30-Sep-08 22:25
Ha ha ha ha ha ha ha ha30-Sep-08 22:25 
GeneralRe: Recording Voice from microphone Pin
fiko851-Oct-08 7:05
fiko851-Oct-08 7:05 
GeneralRe: Recording Voice from microphone Pin
Ha ha ha ha ha ha ha ha2-Oct-08 22:15
Ha ha ha ha ha ha ha ha2-Oct-08 22:15 
QuestionMultiple Threads Pin
Ha ha ha ha ha ha ha ha30-Sep-08 8:10
Ha ha ha ha ha ha ha ha30-Sep-08 8:10 
Hi everyone
I'm developing an application which needs to use multiple threads. As the number of threads needed becomes known during runtime,
I have used an array of threads called "thrRec", all threads use the same method called "readBufferThr(int sh,int uu)"and pass different arguments to it.
My problem is that for example if I choose to run 5 threads, the first thread doesn't call the method properly. Next threads, have no problem, but the first one
wants to run the method in the end and passes wrong arguments to it. Here is my code:


Thread []thrRec=new Thread[chLBDev.CheckedItems.Count];
ThreadStart[] thrStrartRec = new ThreadStart[chLBDev.CheckedItems.Count];
int u=0;

foreach (int i in chLBDev.CheckedIndices)
{
thrStrartRec[u] = new ThreadStart(delegate { readBufferThr(i,u); });
thrRec[u] = new Thread(thrStrartRec[u]);
thrRec[u].Start();
u++;
}

readBufferThr(int sh,int uu)
{
//do something
}

Where's the problem?
Please help.
AnswerRe: Multiple Threads Pin
Ashfield30-Sep-08 21:20
Ashfield30-Sep-08 21:20 
GeneralRe: Multiple Threads Pin
Ha ha ha ha ha ha ha ha30-Sep-08 22:35
Ha ha ha ha ha ha ha ha30-Sep-08 22:35 
QuestionReg:Data Grid Display index and Scrool bar problem Pin
Member 400849230-Sep-08 7:28
Member 400849230-Sep-08 7:28 

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.