Reputation: 20348
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.
Upvotes: 1
Views: 2475
Reputation: 2546
This will pause the thread that called it until is_paused is false. This what you need?
while(is_paused)
Thread.Sleep(sleep_time);
Upvotes: 1