How can you make a bitmap flash (i.e. load then unload)?
Hi,
I have a main picture box(MainPic1) and two other Pictures in boxes (Pic1) and (Pic2). I also have a button. When I press the button, the main picture box becomes pic1, but I want it to change the picture continuously until the button is pressed again, to make it look if the picture is flashing (i.e. alternating between the two). Is it possible to do this? Any Code?
Thanks
Mark
Re: How can you make a bitmap flash (i.e. load then unload)?
Use a timer control and mess around with it's Interval property to change the flash rate, an use a static variable (value is held between function calls) to switch between the two pictures.
Private Sub Timer1_Timer()
Static b As Boolean
If b Then
MainPic1.Picture = Pic1.Picture
Else
MainPic1.Picture = Pic2.Picture
End If
b = Not b
End Sub