Click here to Skip to main content
15,912,475 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I am trying to write the Multiple Choice Questions of different free MCQ Online Tests for personal practice purposes. But I am not able to write the questions and answers because of the timer available in it.

In vb.net with the help of the webbrowser control i want to open the sites.
I want to put two buttons Pause and continue if i click on pause the timer should be paused. and if i click on continue the timer should continue to next questions

But How to do it?

Any help is appreciated

What I have tried:

I tried with
Threading.Thread.Sleep(10000)

but it keeps the form as if it is hanged. it does not allow any interaction

please help
Posted
Updated 23-Oct-18 9:30am

1 solution

You are pausing the main thread of your winform with that code. That means that basically all processing stops for your app.
Notice that you mentioned timer, but you are pausing the _thread_. Because you mentioned the webbrowser control I'm assuming you are showing some content in there that you have control over.
In that case you will want to use JavaScript (yeah!) and use setTimeout() or setInterval(). Check out : JavaScript Timing Events[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900