|
-
October 18th, 2001, 11:07 AM
#1
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
-
October 18th, 2001, 02:17 PM
#2
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
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|