How to write a code in vb to slide images through two command button named like previous and next.When next button will be pressed the next image will be shown in picture box.and the vice-versa for the previous button.
sliding images through two command button
Collapse
X
-
I have made a control array of the picture box and kept a counter of it and tried to loop through all the pictures..But it is not working.....Plz . help.
I have tried it like this--
[CODE=vb]Private Sub Command1_Click( )
For i = 0 To 3
If i = 0 Then
Picture1 [i].Picture = LoadPicture("C: \Documents and Settings\All Users\Documents \My Pictures\Sample Pictures\Winter .jpeg")
End If
If i = 1 Then
Picture1 [i].Picture = LoadPicture("C: \Documents and Settings\All Users\Documents \My Pictures\Sample Pictures\Water lilies.jpeg")
End If
If i = 2 Then
Picture1 [i].Picture = LoadPicture("C: \Documents and Settings\All Users\Documents \My Pictures\Sample Pictures\Sunset .jpeg")
End If
If i = 3 Then
Picture1 [i].Picture = LoadPicture("C: \Documents and Settings\All Users\Documents \My Pictures\Sample Pictures\Blue hills.jpeg")
End If
Next i
End Sub[/CODE]Last edited by Killer42; Oct 7 '07, 11:05 AM.Comment
Comment