tags:

views:

83

answers:

2

I have Desktop Application There is a button Pause. I want to pause Program on button click. I am using Thread. Thread.suspend is not working Please give me idea to solve this.

+1  A: 

This will pause the thread that called it until is_paused is false. This what you need?

while(is_paused)
    Thread.Sleep(sleep_time);
Sheep Slapper
+2  A: 

I think that something like this bytes.com post is what you are looking for.

Benjamin Manns