M
Mr. B
While at first this may seem a simple tast, it has plagued me for a while...
What I want to do is to have the background colour of something like a TextBox
to change from (say) White to Yellow to White to Yellow and then back to White
in about 1 second or so.
This is to create something like a 'flash' (or a Pulse) for when a User clicks
on 1 of 4 Radio Buttons (which change the Text in the TextBox). So in other
words, to get the User's attention that the Text has Changed. Popup boxes are
a pain, so I don't want to go there (ie: they may click several RadioButtons).
I've tried something simple like the following to Test this out. But you do
not 'see' any background change happening. So obvious, I'm missing something
fundamental here:
Private Sub rbASME1_CheckedChanged(ByVal sender As System.Object, _
ByVal e As System.EventArgs) Handles rbASME1.CheckedChanged
pltPrefx = "a"
txbScrName.Text = pltPrefx & pltTitle & pltType
Dim TimCtr, TimX As Integer
For TimX = 1 To 4
If TimX = 1 Then txbScrName.BackColor = Color.Yellow
If TimX = 2 Then txbScrName.BackColor = Color.White
If TimX = 3 Then txbScrName.BackColor = Color.Yellow
If TimX = 4 Then txbScrName.BackColor = Color.White
For TimCtr = 0 To 200000
Next 'timx
Next ' timctr
txbScrName.BackColor = Color.White
End Sub
Anyone else done something similar? I think I tried a Timer Control a while
back also without success...
Regards,
Bruce
What I want to do is to have the background colour of something like a TextBox
to change from (say) White to Yellow to White to Yellow and then back to White
in about 1 second or so.
This is to create something like a 'flash' (or a Pulse) for when a User clicks
on 1 of 4 Radio Buttons (which change the Text in the TextBox). So in other
words, to get the User's attention that the Text has Changed. Popup boxes are
a pain, so I don't want to go there (ie: they may click several RadioButtons).
I've tried something simple like the following to Test this out. But you do
not 'see' any background change happening. So obvious, I'm missing something
fundamental here:
Private Sub rbASME1_CheckedChanged(ByVal sender As System.Object, _
ByVal e As System.EventArgs) Handles rbASME1.CheckedChanged
pltPrefx = "a"
txbScrName.Text = pltPrefx & pltTitle & pltType
Dim TimCtr, TimX As Integer
For TimX = 1 To 4
If TimX = 1 Then txbScrName.BackColor = Color.Yellow
If TimX = 2 Then txbScrName.BackColor = Color.White
If TimX = 3 Then txbScrName.BackColor = Color.Yellow
If TimX = 4 Then txbScrName.BackColor = Color.White
For TimCtr = 0 To 200000
Next 'timx
Next ' timctr
txbScrName.BackColor = Color.White
End Sub
Anyone else done something similar? I think I tried a Timer Control a while
back also without success...
Regards,
Bruce