HimeAnator Member Licensed User Longtime User Apr 3, 2015 #1 I'm working on a simple project that turns the device screen into a flashing hazard light, I have gotten it to work using a timer and a two panels and implementing the code below... Code: Copy Sub LightTimer_Tick If LightCount = 0 Then Panel1.Color = Colors.ARGB(255,255, 174, 0) Panel2.Color = Colors.white LightCount = 1 Else Panel1.Color = Colors.white Panel2.Color = Colors.ARGB(255,255, 174, 0) LightCount = 0 End If End Sub The panels alternate color, however 1 second is really too slow for what I am trying to achieve, I want them to change a lot more rapidly/faster. Is there anyway to have the timer tick faster, or is there another way I should go about this? Any help is much appreciated!
I'm working on a simple project that turns the device screen into a flashing hazard light, I have gotten it to work using a timer and a two panels and implementing the code below... Code: Copy Sub LightTimer_Tick If LightCount = 0 Then Panel1.Color = Colors.ARGB(255,255, 174, 0) Panel2.Color = Colors.white LightCount = 1 Else Panel1.Color = Colors.white Panel2.Color = Colors.ARGB(255,255, 174, 0) LightCount = 0 End If End Sub The panels alternate color, however 1 second is really too slow for what I am trying to achieve, I want them to change a lot more rapidly/faster. Is there anyway to have the timer tick faster, or is there another way I should go about this? Any help is much appreciated!
NJDude Expert Licensed User Longtime User Apr 3, 2015 #2 Set a shorter interval when you initialize the timer, that's all. Upvote 0
HimeAnator Member Licensed User Longtime User Apr 3, 2015 #3 I thought the shortest interval was "1000" Upvote 0
HimeAnator Member Licensed User Longtime User Apr 3, 2015 #4 Oh wow ok I just set it "100" and it worked. I guess I should have at least attempted it before asking thank you!!!!! Upvote 0
Oh wow ok I just set it "100" and it worked. I guess I should have at least attempted it before asking thank you!!!!!