Click here to Skip to main content
15,923,120 members
Home / Discussions / C#
   

C#

 
JokeRe: Static constructor Pin
Le centriste21-Jun-06 8:57
Le centriste21-Jun-06 8:57 
GeneralRe: Static constructor Pin
Josh Smith24-Jun-06 15:37
Josh Smith24-Jun-06 15:37 
QuestionArgh, no matter how long I stare at this, I don't get it (XML Serialization related) [modified] Pin
ThisIsMyUserName220-Jun-06 6:37
ThisIsMyUserName220-Jun-06 6:37 
AnswerRe: Argh, no matter how long I stare at this, I don't get it (XML Serialization related) [modified] Pin
mikanu20-Jun-06 9:09
mikanu20-Jun-06 9:09 
GeneralRe: Argh, no matter how long I stare at this, I don't get it (XML Serialization related) [modified] Pin
ThisIsMyUserName220-Jun-06 10:57
ThisIsMyUserName220-Jun-06 10:57 
Questionregain control Pin
donkaiser20-Jun-06 5:59
donkaiser20-Jun-06 5:59 
AnswerRe: regain control Pin
Nicholas Butler20-Jun-06 6:08
sitebuilderNicholas Butler20-Jun-06 6:08 
AnswerRe: regain control Pin
Jun Du20-Jun-06 6:13
Jun Du20-Jun-06 6:13 
This looks like a typical case which multitherading can play a role in. Here is my take and see if it makes sense.

When you click the "run" (which I call it) button, start a thread. Place the infinite loop in the thread function. This should guarantee that the form still responds to your click while the infinite loop is looping.

In order for your infinite loop to accept new selections made by the user, there should be some data exchange between the main thread and your looping thread. This has to be done through some thread synchronization mechanisms, say, critical section or mutex.

In short, multithreading is a good way to solve your problem.



Best,
Jun
GeneralRe: regain control Pin
donkaiser20-Jun-06 6:18
donkaiser20-Jun-06 6:18 
GeneralRe: regain control [modified] Pin
Judah Gabriel Himango20-Jun-06 10:18
sponsorJudah Gabriel Himango20-Jun-06 10:18 
AnswerRe: regain control Pin
darkelv21-Jun-06 0:02
darkelv21-Jun-06 0:02 
QuestionDatagrid with Dataset and Multiple Tables Pin
Leon van Wyk20-Jun-06 5:49
professionalLeon van Wyk20-Jun-06 5:49 
QuestionAutomating Team [modified] Pin
Ista20-Jun-06 5:31
Ista20-Jun-06 5:31 
Questioncode protection for MSIL Pin
yigalef20-Jun-06 5:14
yigalef20-Jun-06 5:14 
AnswerRe: code protection for MSIL Pin
led mike20-Jun-06 5:24
led mike20-Jun-06 5:24 
Questiontimer loop from vb5 Pin
donkaiser20-Jun-06 4:48
donkaiser20-Jun-06 4:48 
AnswerRe: timer loop from vb5 [modified] Pin
led mike20-Jun-06 5:15
led mike20-Jun-06 5:15 
Questiondynamic control Pin
abhaygalande20-Jun-06 4:28
abhaygalande20-Jun-06 4:28 
AnswerRe: dynamic control Pin
Josh Smith20-Jun-06 4:59
Josh Smith20-Jun-06 4:59 
QuestionGet values from a Listview [modified] Pin
Willem_Le_Roux20-Jun-06 3:43
Willem_Le_Roux20-Jun-06 3:43 
AnswerRe: Get values from a Listview Pin
Drew McGhie20-Jun-06 4:19
Drew McGhie20-Jun-06 4:19 
AnswerRe: Get values from a Listview Pin
Josh Smith20-Jun-06 4:30
Josh Smith20-Jun-06 4:30 
GeneralRe: Get values from a Listview [modified] Pin
Willem_Le_Roux20-Jun-06 23:02
Willem_Le_Roux20-Jun-06 23:02 
Questionlist files in directory ordered by creation time Pin
valiovalio20-Jun-06 3:29
valiovalio20-Jun-06 3:29 
AnswerRe: list files in directory ordered by creation time Pin
Guffa20-Jun-06 3:42
Guffa20-Jun-06 3:42 

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.