469,616 Members | 1,754 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,616 developers. It's quick & easy.

Common Dialog Stops Timer

I have a form that has a timer running on it (System.Timers.Timer). On this form, I have a button that opens a Common Dialog box. As soon as this button is pressed, the timer stops running. When I return and close the common dialog, the timer will not start up again, no matter what I do. If I stop the timer before the box is displayed, and then try to start it afterwards (timer.start), it still doesn't work. I don't need to respond to events when the dialog is open, I just want the timer to resume when the dialog is closed.

How can I do this?

Thanks a bunch,

Adam
Nov 20 '05 #1
4 1718
Sounds like a buglet to me - in the common dialog control.

"Adam" <an*******@discussions.microsoft.com> wrote in message
news:DA**********************************@microsof t.com...
I have a form that has a timer running on it (System.Timers.Timer). On this form, I have a button that opens a Common Dialog box. As soon as this
button is pressed, the timer stops running. When I return and close the
common dialog, the timer will not start up again, no matter what I do. If I
stop the timer before the box is displayed, and then try to start it
afterwards (timer.start), it still doesn't work. I don't need to respond to
events when the dialog is open, I just want the timer to resume when the
dialog is closed.
How can I do this?

Thanks a bunch,

Adam

Nov 20 '05 #2
* "=?Utf-8?B?QWRhbQ==?=" <an*******@discussions.microsoft.com> scripsit:
I have a form that has a timer running on it (System.Timers.Timer). On this form, I have a button that opens a Common Dialog box. As soon as this button is pressed, the timer stops running. When I return and close the common dialog, the timer will not start up again, no matter what I do. If I stop the timer before the box is displayed, and then try to start it afterwards (timer.start), it still doesn't work. I don't need to respond to events when the dialog is open, I just want the timer to resume when the dialog is closed.


Are you using the .NET "common dialogs" or the old Common Dialogs
ActiveX component?

--
Herfried K. Wagner
MVP · VB Classic, VB.NET
<http://www.mvps.org/dotnet>
Nov 20 '05 #3
I am using the one in the VS.NET 2003 toolbox, by dragging and dropping onto my form. Any other ideas/help?

Thanks,

Adam
Nov 20 '05 #4
Hi Adam,

I was just saying in a different thread that there are three set of Timers
that you can use. (And Cor says I mised some!!) Anyway. Why not use one of the
others.

Forms.Timer is the familiar drag-n-drop one.

System.Timers.Timer is one that can be used without a Form. It's
similar in use in that it raises an Event to which a class in your app
subscribes.

http://msdn.microsoft.com/library/de.../cpref/html/fr
lrfsystemtimerstimerclassctortopic.asp

System.Threading.Timer is one which you provide a callback method.
When the Timer goes off, this method is called in its own Thread.

http://msdn.microsoft.com/library/de.../cpref/html/fr
lrfsystemthreadingtimerclassctortopic2.asp

There's a (typically MSDN) example given with each.

Regards,
Fergus
Nov 20 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

23 posts views Thread by George | last post: by
2 posts views Thread by jamie | last post: by
5 posts views Thread by Adrian Enders | last post: by
6 posts views Thread by Steve Barnett | last post: by
1 post views Thread by =?Utf-8?B?UmljaA==?= | last post: by
reply views Thread by devrayhaan | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.