Click here to Skip to main content
15,902,445 members
Home / Discussions / C#
   

C#

 
QuestionHow to freeze an application? Pin
Anneke27-Aug-08 0:45
Anneke27-Aug-08 0:45 
AnswerRe: How to freeze an application? Pin
User 665827-Aug-08 0:57
User 665827-Aug-08 0:57 
GeneralRe: How to freeze an application? Pin
Anneke27-Aug-08 5:04
Anneke27-Aug-08 5:04 
GeneralRe: How to freeze an application? Pin
Thomas Stockwell27-Aug-08 6:10
professionalThomas Stockwell27-Aug-08 6:10 
AnswerRe: How to freeze an application? [modified] Pin
oobimoo27-Aug-08 1:36
oobimoo27-Aug-08 1:36 
JokeRe: How to freeze an application? Pin
carbon_golem27-Aug-08 2:18
carbon_golem27-Aug-08 2:18 
GeneralRe: How to freeze an application? Pin
chaiguy133727-Aug-08 4:35
chaiguy133727-Aug-08 4:35 
AnswerRe: How to freeze an application? Pin
chaiguy133727-Aug-08 4:55
chaiguy133727-Aug-08 4:55 
As the others suggested, the answer is to stop the actual simulation from taking place by means of something like an internal variable or a timer setting. Simply freezing the application will cause Windows to think it has hung, and which will display the unresponsive program dialog (which I am guessing is what you are calling "crashing"). It will also not allow you to unfreeze it again later.

You might also look into performing the simulation on a separate thread (though remember you will still have to update the picturebox on the main thread), because then you will just be able to pause and resume the simulation thread at will, and without chewing up CPU cycles in an infinite loop. Smile | :)

“Time and space can be a bitch.”
–Gushie, Quantum Leap

{o,o}.oO( Looking for a great RSS reader? Try FeedBeast! )
|)””’)            Built with home-grown CodeProject components!
-”-”-

GeneralRe: How to freeze an application? Pin
Anneke27-Aug-08 5:20
Anneke27-Aug-08 5:20 
GeneralRe: How to freeze an application? Pin
chaiguy133727-Aug-08 5:25
chaiguy133727-Aug-08 5:25 
QuestionMS Word and Excel from C# Pin
Piyush Vaishnav27-Aug-08 0:38
Piyush Vaishnav27-Aug-08 0:38 
AnswerRe: MS Word and Excel from C# Pin
Manas Bhardwaj27-Aug-08 0:49
professionalManas Bhardwaj27-Aug-08 0:49 
AnswerRe: MS Word and Excel from C# Pin
Anthony Mushrow27-Aug-08 1:43
professionalAnthony Mushrow27-Aug-08 1:43 
GeneralRe: MS Word and Excel from C# Pin
Piyush Vaishnav27-Aug-08 18:10
Piyush Vaishnav27-Aug-08 18:10 
QuestionReaching sql database diagram using smo ?? Pin
omegazafer26-Aug-08 23:43
omegazafer26-Aug-08 23:43 
AnswerIgnore Repost Pin
Manas Bhardwaj27-Aug-08 0:04
professionalManas Bhardwaj27-Aug-08 0:04 
QuestionDatetimePicker problem. [modified] Pin
vinay_K26-Aug-08 23:38
vinay_K26-Aug-08 23:38 
QuestionComClass in C# Pin
Saranya B26-Aug-08 23:37
Saranya B26-Aug-08 23:37 
Questionhow can i change machain date Pin
Mohammed Elkholy26-Aug-08 23:30
Mohammed Elkholy26-Aug-08 23:30 
JokeRe: how can i change machain date Pin
Manas Bhardwaj27-Aug-08 0:07
professionalManas Bhardwaj27-Aug-08 0:07 
GeneralRe: how can i change machain date Pin
Mohammed Elkholy27-Aug-08 5:14
Mohammed Elkholy27-Aug-08 5:14 
AnswerRe: how can i change machain date Pin
varun_mca_ju27-Aug-08 0:39
varun_mca_ju27-Aug-08 0:39 
AnswerRe: how can i change machain date Pin
lisan_al_ghaib27-Aug-08 0:49
lisan_al_ghaib27-Aug-08 0:49 
GeneralRe: how can i change machain date Pin
Mohammed Elkholy27-Aug-08 5:16
Mohammed Elkholy27-Aug-08 5:16 
GeneralRe: how can i change machain date Pin
lisan_al_ghaib27-Aug-08 5:49
lisan_al_ghaib27-Aug-08 5:49 

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.