A) Program Design :
(B) Property(Controls Used) :
- Command Button - CAPTION- Exit
- Timer - INTERVAL - 1000
- Picture Box - PICTURE - none
(C) Attaching Code to the Object :
Dim Pictures() As String Dim i As Integer |
Private Sub Command1_Click() Unload Me End Sub |
Private Sub Form_Load() Pictures(0) = "c:\My Documents\My Pictures\Sample Pictures\Blue hills.JPEG" Pictures(1) = "c:\My Documents\My Pictures\Sample Pictures\Sunset.JPEG" Pictures(2) = "c:\My Documents\My Pictures\Sample Pictures\Water lilies.JPEG" i = 0 End Sub |
Private Sub Timer1_Timer() Index = i Mod 3 Picture1.Picture = LoadPicture(Pictures(Index)) i = i + 1 End Sub |
Error in Output as "Subscript out of range"
- ====================================================================
===========================================================
No comments:
Post a Comment