I need to programmically close a PrintDialog form after it is displayed with
the "ShowDialog" method in case the user does not dismiss it himself. My app
needs to have it time out. How can this be done ?

Re: Print Dialog by Bryan

Bryan
Fri Jan 19 05:58:55 CST 2007

Just before you call ShowDialog, use the BackgroundWorker to spawn a
thread to start a Timer which will call Close on the dialog when the
timer elapses. Make sure that WorkerSupportsCancellation is set to true
and that you check the CancellationPending property before you close the
form.

Does this make sense?

--
Bryan Phillips
MCSD, MCDBA, MCSE
Blog: http://bphillips76.spaces.live.com



"Lou Jackson" <jacksonl@optonline.net> wrote in message
news:#Iy4WpOOHHA.3212@TK2MSFTNGP02.phx.gbl:

> I need to programmically close a PrintDialog form after it is displayed with
> the "ShowDialog" method in case the user does not dismiss it himself. My app
> needs to have it time out. How can this be done ?