Flashing Box/Object

J

Joe

Hello All:
Does anyone have good way to make an object flash? I'm
trying to bring the user's attention to an area of a form
when they make a selection. I've tried the following, but
it happens a little too fast.

Dim ctr As Integer
Dim backer As Integer
Dim div As Integer

ctr = 1
While ctr <> 10000
ctr = ctr + 1
div = ctr Mod 2
If div > 1 Then backer = 1 Else: backer = 0

Me.boxParameter.BackStyle = backer
Wend

Any help is greatly appreciated.
Thanks,
Joe
 
N

Nikos Yannacopoulos

Joe,

It would be simpler to use the form's timer event (Properties > Events) to
fire some code that alternates the background color between two different
colors, something like:

If Me.boxParameter.BackStyle = 1 Then
Me.boxParameter.BackStyle = 0
Else
Me.boxParameter.BackStyle =1
End If

The timer interval is set in milliseconds, i.e. a number of 1000 => 1 sec.

HTH,
Nikos
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top