0

I am new in vb.net WPF coding, need advice how to get idle time on window to prevent dispatcher timer if user is using app? dispatcher should execute only if window idle time is greater then 1 minute

Public Sub dispatcherTimer_Tick(ByVal sender As Object, ByVal e As EventArgs)
   naloziDGV1()
   naloziDGV2()
   naloziDGV3()
End Sub
John
  • 3,057
  • 1
  • 4
  • 10
  • solved problem by adding start and stop of dispatcher on window GotFocus event: Private Sub Monitor1_GotFocus(sender As Object, e As RoutedEventArgs) Handles MyBase.GotFocus, MyBase.GotFocus dit.Stop() dit.Start() End Sub – Vlado Stare Sep 18 '22 at 22:43
  • If you have answered your own question then please add and accept an answer (if you're able to) or else delete the question. Questions should not be left unanswered. Also, please don't include tags in the title. That's what tags are for. – John Sep 19 '22 at 00:50

0 Answers0