Pause program

  • Thread starter Thread starter Ed Bitzer
  • Start date Start date
E

Ed Bitzer

I would like to display a notice for a timed period and hold the
program at that point until the time period is up. If I use a timer
and display a form with my notice using form.show the code continues;
a form.showdialog halts everything before the timer starts.

Appreciate some direction.

Ed
 
Patrice,

Looks like I should learn a bit about threading from your first
suggestion. May I assume you can drop into a single thread and then
within this tread sleep, then when the timer finishes continue
execution?

A tool tip display would be fine but I have only seen code that
creates these messages from a mouse over event.

The status area sounds equally viable for my purpose and I assume that
any display here pauses execution of the code while a timer runs out.

Ed
 
Patrice pushed me into a bit of "learning" and I solved my problem by
starting a BackgroundWorker with a "sleep" loop, then letting the code
fall through and display my message with ShowDialog. That dialog box
stopped the code and waited for the sleep loop to finish which then
closes the dialog box.

Ed
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top