Timer in button not work

Answered
0
0

Hi,

Timer in button which worked before now not works.

 

Public Class CButton
Inherits Button
Dim WithEvents OTimerRed As Wisej.Web.Timer

 

Public Sub New(InOStrObjectID As String)
End Sub

Private Sub OTimerRed_Tick(sender As Object, e As EventArgs) Handles OTimerRed.Tick
OTimerRed.Stop()
Me.BackColor = Color.LightBlue

End Sub
Public Function FSetInRed() As Boolean
‘Dim OTimerRed As New Timer With {.Interval = 777 * 2}
Dim OTimerRed As New Timer
OTimerRed.Enabled = True
OTimerRed.Interval = 777 * 2
OTimerRed.Start()

Me.BackColor = Color.Red
Return True
End Function

End Class

  • You must to post comments
Best Answer
0
0

Hi
I attach an executable with your code
Was needed to correct constructor and initialization variable

Also can see the small gif video

Regards

  • You must to post comments
0
0

Thank you so much!

Best regards!

  • You must to post comments
Showing 2 results
Your Answer

Please first to submit.