Jobs
Author: chandra mohan Date Submitted: 11/5/2007 Category: Forms Compatibility: VB 6 This code has been accessed 4709 times.
Email Yourself this snippet:
add 2-picture box 2-image list 1-command button 1-timer command1 caption-ENTER right click the imagelists and add 2 pictures on each of them set timer interval to 1000
Code
Private Sub command1_Click() Timer1.Enabled = True End Sub Private Sub Timer1_timer() Static blnImage1 As Boolean Static blnImage2 As Boolean If blnImage1 Then Picture1.Picture = ImageList1.ListImages(1).Picture Else Picture1.Picture = ImageList1.ListImages(2).Picture End If blnImage1 = Not blnImage1 If blnImage2 Then Picture2.Picture = ImageList2.ListImages(1).Picture Else Picture2.Picture = ImageList2.ListImages(2).Picture End If blnImage2 = Not blnImage2 End Sub