0

It seems WinAPI SetTimer() conflicts with WPF threading model. If you call SetTimer() in WPF main thread, it may cause the timer not to fire properly. HWND for SetTimer() is null. Is that conflict true?

linquize
  • 19,828
  • 10
  • 59
  • 83
  • Try using the WPF specific DispatcherTimer instead. See http://stackoverflow.com/questions/1111645/comparing-timer-with-dispatchertimer. – Phil Jun 11 '12 at 15:02
  • I don't know absolutely, but I do know that WPF does not use the Win32 API like Winforms does. I would recommend reading: http://msdn.microsoft.com/en-us/library/ms742522.aspx#hwnds – CodingGorilla Jun 11 '12 at 15:03
  • I cannot control what timer to use because SetTimer() is called by a proprietary dll. – linquize Jun 11 '12 at 15:04

0 Answers0