473,695 Members | 1,870 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1885
Sounds like a buglet to me - in the common dialog control.

"Adam" <an*******@disc ussions.microso ft.com> wrote in message
news:DA******** *************** ***********@mic rosoft.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*******@disc ussions.microso ft.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.T imer 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
lrfsystemtimers timerclassctort opic.asp

System.Threadin g.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
lrfsystemthread ingtimerclassct ortopic2.asp

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

Regards,
Fergus
Nov 20 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
6795
by: S.W. Rasmussen | last post by:
With the risk of being accused of multi-posting I would like to draw the attention to a serious visual basic/windows issue discussed in the microsoft.public.vb.bugs newsgroup. As pointed out below by Norman Diamond the bug may result in loss of data when saving files with the standard common dialog control. Norman Diamond describes the problem as follows: ---------- In VB6 SP6, VB6 SP5, and possibly others, the common dialog box...
23
7001
by: George | last post by:
Is there a way to customize the open file common dialog? I am trying to modify the button text so I can create a delete file common dialog. I need the same functionality of the open file common dialog but just need to change the button text from "open" to "delete". Any ideas? Thanks
2
2645
by: jamie | last post by:
I have a class that based on a timer will pop up a dialog based on a lasped amount of time. The problem is that in the timer elapsed event I create and use ShowDialog to show the timeout form: frmTimeout dlg = new frmTimeout(); dlg.ShowDialog(dlgOwner); <-- dlgOwner if the IWin32Window of the window in focus
5
1769
by: Adrian Enders | last post by:
I have something that I have never seen before in a MS development product. I have a pretty simple call to a network directory that looks something like this ... Dim dirFolder As System.IO.DirectoryInfo dirFolder = New System.IO.DirectoryInfo(sFilePath) Dim filFiles() As System.IO.FileInfo
0
1293
by: Robm | last post by:
I have a minimized form in a 24/7 app which uses a form timer to check various conditions. Sometimes the timer event stops firing until the mouse is moved or a key is pressed. There are other forms in the same app which also uses the form timer (and they might get stuck at the same time, although this is hard to prove), while there is another Access app, which also uses a form with a timer, which does keep firing correctly. Any and all...
6
1916
by: Steve Barnett | last post by:
I need to include a wizard in my application that will, as one of the steps, ask the user to select a file to open and (later) a file to save it as. The naff way to do this would be to have a button on the form that pops-up the common dialog. The cool way to do this would be to have the common dialog embedded in the wizard. I know it's possible, as I've seen other apps do this kind of thing, but I have no ideas how it can be achieved and...
2
4058
by: jajalc | last post by:
Hi all, WE have a windows service using .net and which uses a System.Timers.Timer..all the of code works fine..... but after a extended period of time the timer just stops firing the elasped event. the elasped event is fired every 2 sec and the code which is in the elasped event is multithreaded. This only happens if the service runs for a extended peroid of time..
5
1821
by: =?Utf-8?B?UHVjY2E=?= | last post by:
Hi, I'm using vs2005, .net 2.0. I have a form with crystal Viewer that I call as showdialog. I want to give the user an option to cancel out of it is it's taking too long to process. Is there a way to do this? How can I pop up another dialog box or message in this dialog form for user to click on a Cancel button if it's taking to long to display the report? -- Thanks.
1
2469
by: =?Utf-8?B?UmljaA==?= | last post by:
In a database search application (vb2005), the user wants to be able to scroll through records using the mousewheel. The data display form contains textboxes for the main data and a datagridview for the detail data for each main record. The form also contains btnBegining, btnPrevious, btnNext, btnEnd. In the btnNext.MouseWheel event I can increment/decrement the main data currencymanager position of the main dataset (depending on...
0
8650
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8586
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9140
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9004
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
6510
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5843
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4597
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3025
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2290
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.