sir the version of vb that i am using is Visual basic 6.0.
sir now i am submitting the details.i have made a picture viewer application .on which i have placed a image control and dirlistbox ,drivelistbox,and the filelistbox. in the coding of the file listbox i have entered
- Private Sub file1_click()
-
Dim hello As String
-
hello = file1.Path & "\" & file1.FileName
-
If Right$(hello, 3) = "jpg" Then
-
image1.Picture = LoadPicture(hello)
-
Else
-
image1.Picture = LoadPicture(hello)
-
End If
-
If file1.ListIndex = file1.ListCount - 1 Then
-
file1.ListIndex = 0
-
End If
-
End Sub
according to this coding when i press the right arrow key then the next image is displayed in the image control.but when i reach on the end or at the last picture then the last picture is not displayed .now i want that when i reach on the last picture then the last picture should be displayed and when i again press the right arrow key then the first image should be displayed(as in the window picture and fax viewer).