Click here to Skip to main content
15,899,314 members
Home / Discussions / C#
   

C#

 
GeneralRe: how do i compare two datagrid views? Pin
Stathread7-Nov-06 3:59
Stathread7-Nov-06 3:59 
QuestionIsuses with timers + fast intervals Pin
bankai1236-Nov-06 17:33
bankai1236-Nov-06 17:33 
AnswerRe: Isuses with timers + fast intervals Pin
kselman6-Nov-06 17:52
kselman6-Nov-06 17:52 
AnswerRe: Isuses with timers + fast intervals Pin
Stathread6-Nov-06 17:57
Stathread6-Nov-06 17:57 
GeneralRe: Isuses with timers + fast intervals Pin
bankai1236-Nov-06 18:11
bankai1236-Nov-06 18:11 
AnswerRe: Isuses with timers + fast intervals Pin
Martin#6-Nov-06 21:00
Martin#6-Nov-06 21:00 
AnswerRe: Isuses with timers + fast intervals Pin
Coding C#7-Nov-06 0:09
Coding C#7-Nov-06 0:09 
AnswerRe: Isuses with timers + fast intervals Pin
S. Senthil Kumar7-Nov-06 5:53
S. Senthil Kumar7-Nov-06 5:53 
bankai123 wrote:
Is each tick executed on a separate thread?


No, all ticks on a System.Windows.Forms.Timer run on the UI thread.


bankai123 wrote:
If not, then what happens?


Every timer tick runs as a result of a WM_TIMER message being processed by the message dispatcher. Windows doesn't post the WM_TIMER message to the message queue if they are any pending messages (including WM_TIMER) in the queue. This prevents the scenario you described (a tick firing even when processing for the previous tick is executing). Note that any message in the message queue will prevent the timer from ticking, so for example, if your UI button click handler takes one second to execute, then you won't get timer ticks for that one second.

Also, note that no queuing of ticks happens, so you won't get ticks one after the other corresponding to the period when no timer ticks executed. In the above example, you won't get timer ticks corresponding to that one second period even after your button handler has completed execution.

Hope this helps.

Regards
Senthil [MVP - Visual C#]
_____________________________
My Blog | My Articles | My Flickr | WinMacro

AnswerRe: Isuses with timers + fast intervals Pin
Martin#7-Nov-06 8:16
Martin#7-Nov-06 8:16 
GeneralRe: Isuses with timers + fast intervals Pin
bankai1237-Nov-06 21:27
bankai1237-Nov-06 21:27 
QuestionC# 2.0 ASP.NET Postback & ObjectDataSource Pin
kselman6-Nov-06 17:30
kselman6-Nov-06 17:30 
AnswerRe: C# 2.0 ASP.NET Postback & ObjectDataSource Pin
Christopher Duncan7-Nov-06 3:20
Christopher Duncan7-Nov-06 3:20 
Questionusing WinForms control from another thread Pin
peterchen6-Nov-06 13:09
peterchen6-Nov-06 13:09 
AnswerRe: using WinForms control from another thread Pin
Judah Gabriel Himango6-Nov-06 13:18
sponsorJudah Gabriel Himango6-Nov-06 13:18 
GeneralRe: using WinForms control from another thread Pin
peterchen6-Nov-06 14:33
peterchen6-Nov-06 14:33 
GeneralRe: using WinForms control from another thread Pin
Judah Gabriel Himango6-Nov-06 15:50
sponsorJudah Gabriel Himango6-Nov-06 15:50 
Questiontesting for a bit in an enum Pin
peterchen6-Nov-06 13:03
peterchen6-Nov-06 13:03 
AnswerRe: testing for a bit in an enum Pin
Luc Pattyn6-Nov-06 13:35
sitebuilderLuc Pattyn6-Nov-06 13:35 
GeneralRe: testing for a bit in an enum Pin
peterchen6-Nov-06 13:44
peterchen6-Nov-06 13:44 
AnswerRe: testing for a bit in an enum Pin
Scott Dorman8-Nov-06 7:43
professionalScott Dorman8-Nov-06 7:43 
QuestiondataGrid and textBox Pin
aPerfectCircle6-Nov-06 12:39
aPerfectCircle6-Nov-06 12:39 
AnswerRe: dataGrid and textBox Pin
freshonlineMax6-Nov-06 18:15
freshonlineMax6-Nov-06 18:15 
AnswerRe: dataGrid and textBox Pin
mkc2k36-Nov-06 18:17
mkc2k36-Nov-06 18:17 
AnswerRe: dataGrid and textBox Pin
aPerfectCircle7-Nov-06 13:43
aPerfectCircle7-Nov-06 13:43 
Questionhow to set password on Sqlserver 2005 database ? Pin
hdv2126-Nov-06 10:09
hdv2126-Nov-06 10:09 

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.