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

C#

 
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 
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 
First of all, move all of that outside of PictureBox.Paint and into a separate thread that modifies a shared (synchronized) bitmap image. Then run the above and either send events to the main thread to update the picture box with the current state of the bitmap at various intervals, or do this on a timer. Just be sure to use lock() before accessing the shared bitmap on either thread.

In PictureBox.Paint just draw the shared bitmap to the PictureBox.

Now when you pause the simulation, the picturebox should no longer receive signals to update, or if you put it on a separate timer, you should also pause that timer when you pause the simulation.

Logan

“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!
-”-”-

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 
QuestionClass inheritance question Pin
Mc_Topaz26-Aug-08 23:17
Mc_Topaz26-Aug-08 23:17 
AnswerRe: Class inheritance question Pin
Manas Bhardwaj26-Aug-08 23:19
professionalManas Bhardwaj26-Aug-08 23:19 

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.