Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Windows Forms / WinForm General / August 2006

Tip: Looking for answers? Try searching our database.

wintimer

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
luca - 28 Aug 2006 10:09 GMT
hi all i have a question with win form and timer..

The situation: i have a winform c# application (developped with visual
studio 2005) which has to check the status of an internet connection on
regular intervals. If the connection is avaible the application has to
connect to a database to downloading some data.

my problem: i use a timer of the class system.windows.forms.timer and i
check the connection every tickevent : this operation is managed by the
same thread of the user interface? so this can slow the responsivness
of the application?

an other solution i have thinked : every tick event i start a
backgroundworker which check the connection and if it is possible makes
some operation with database. Is this a dummy idea?

Do you have some suggetion to solve my problem in the best way?

Sorry for  possible mistakes...i am italian
Bob Powell [MVP] - 28 Aug 2006 14:03 GMT
The System.Timers.Timer class does not depend on the message pump and calls
the elapsed event on another thread. This sort of timer is more suitable for
such an application.

See System.Threading.Timer too.

Signature

Bob Powell [MVP]
Visual C#, System.Drawing

Ramuseco Limited .NET consulting
http://www.ramuseco.com

Find great Windows Forms articles in Windows Forms Tips and Tricks
http://www.bobpowell.net/tipstricks.htm

Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/faqmain.htm

All new articles provide code in C# and VB.NET.
Subscribe to the RSS feeds provided and never miss a new article.

> hi all i have a question with win form and timer..
>
[quoted text clipped - 15 lines]
>
> Sorry for  possible mistakes...i am italian
luca - 28 Aug 2006 15:51 GMT
thanks for the replay.. im going to study that class

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.