1

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
  • 1
    Also what are you pausing? Are you pausing a long running operation, is your task being executed on a separate thread? Commented Feb 19, 2010 at 6:57

1 Answer 1

1

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

while(is_paused) Thread.Sleep(sleep_time); 
Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.