Click here to Skip to main content
15,916,091 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: VB.net (Visual studio 2005) Pin
Justin Perez25-Jan-08 3:04
Justin Perez25-Jan-08 3:04 
GeneralRe: VB.net (Visual studio 2005) Pin
Paul Conrad25-Jan-08 3:50
professionalPaul Conrad25-Jan-08 3:50 
GeneralRe: VB.net (Visual studio 2005) Pin
Justin Perez25-Jan-08 3:55
Justin Perez25-Jan-08 3:55 
GeneralMaking the coloum header of datagridview read only Pin
Pradip Kishore25-Jan-08 0:20
Pradip Kishore25-Jan-08 0:20 
GeneralRe: Making the coloum header of datagridview read only Pin
Francis K Antony25-Jan-08 1:03
Francis K Antony25-Jan-08 1:03 
GeneralRe: Making the coloum header of datagridview read only Pin
Pradip Kishore25-Jan-08 2:25
Pradip Kishore25-Jan-08 2:25 
GeneralTo Drag And Drop B/W Two List Box [modified] Pin
sumit703424-Jan-08 22:15
sumit703424-Jan-08 22:15 
GeneralRe: To Drag And Drop B/W Two List Box Pin
Justin Perez25-Jan-08 3:06
Justin Perez25-Jan-08 3:06 
Questionvb6 code to vb.net code Pin
Member 412150324-Jan-08 21:14
Member 412150324-Jan-08 21:14 
GeneralRe: vb6 code to vb.net code Pin
Johan Hakkesteegt25-Jan-08 2:16
Johan Hakkesteegt25-Jan-08 2:16 
AnswerRe: vb6 code to vb.net code Pin
Guffa25-Jan-08 6:02
Guffa25-Jan-08 6:02 
QuestionDesign Card Pin
structures8324-Jan-08 20:31
structures8324-Jan-08 20:31 
GeneralRe: Design Card Pin
Johan Hakkesteegt25-Jan-08 1:56
Johan Hakkesteegt25-Jan-08 1:56 
GeneralRe: Design Card Pin
Dave Kreskowiak25-Jan-08 3:46
mveDave Kreskowiak25-Jan-08 3:46 
Questionbarcode reader Pin
structures8324-Jan-08 20:27
structures8324-Jan-08 20:27 
GeneralRe: barcode reader Pin
CKnig24-Jan-08 21:39
CKnig24-Jan-08 21:39 
GeneralRe: barcode reader Pin
Tom John24-Jan-08 22:01
Tom John24-Jan-08 22:01 
GeneralRe: barcode reader Pin
Justin Perez25-Jan-08 3:14
Justin Perez25-Jan-08 3:14 
GeneralRe: barcode reader Pin
Paul Conrad25-Jan-08 3:56
professionalPaul Conrad25-Jan-08 3:56 
GeneralRe: barcode reader Pin
Dave Kreskowiak25-Jan-08 3:44
mveDave Kreskowiak25-Jan-08 3:44 
GeneralRe: barcode reader Pin
Paul Conrad25-Jan-08 3:55
professionalPaul Conrad25-Jan-08 3:55 
Questionproblem with basic timer in vb.net [modified] Pin
Chun224-Jan-08 19:48
Chun224-Jan-08 19:48 
GeneralRe: problem with basic timer in vb.net Pin
CKnig24-Jan-08 21:44
CKnig24-Jan-08 21:44 
GeneralRe: problem with basic timer in vb.net Pin
Chun225-Jan-08 5:36
Chun225-Jan-08 5:36 
GeneralRe: problem with basic timer in vb.net Pin
Dave Kreskowiak25-Jan-08 9:41
mveDave Kreskowiak25-Jan-08 9:41 
Out of all the Timers that come in the .NET Framework, the System.Windows.Forms.Timer class is about the worst when it comes to raising it's event on time. System.Timers.Timer is better, but can still be late. The System.Threading.Timer is the most accurate, but is also the hardest to use.

In any case, counting ticks of a timer is about the worst way you can implement this. You should be using a rather fast firing timer (accurate or not) and comparing the current time to the scheduled time of a process you need to launch, even if it's every one second.

If you're code is doing other things and the UI thread is blocked for longer than your Timer's Interval is set for, using anything but the Threading.Timer will result in your tick count not being accurate because the events cannot be processed until the UI thread is unblocked.

Another possible issue is something else running on the machine could be screwing with the O/S-based timers that the .NET Timer classes rely on. Be it bad hardware or an O/S problem.



A guide to posting questions on CodeProject[^]



Dave Kreskowiak
Microsoft MVP
Visual Developer - Visual Basic
     2006, 2007




General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.