hi there i'm new here. so btw i was given a challenge by my teacher to make a picture viewer. i was asked to use the following controls:
1.drive list box
2.dir list box
3.file list box
4.picture box
5.combo box

the combo box should contain the following data:
1. ".jpg" extension
2. ".bmp"
3. ".gif"

the file list box should only view the files with this extension so when you click it, the picture will appear on the picture box

i've figured out how to link the drive list box, dir list box and file list box. My problem now is how to view only the files with the extensions mentioned above so that when i click them on the file list box, the images with the extension will be viewed on the picture box.
please help me by either giving tips or by posting the code here. thanks
btw i'm using VB 6.0 and i'm making a standard EXE file


Ty the below coding.
'Set Directory Path
Private Sub Drive1_Change()
Dir1.Path = Drive1.Drive
End Sub

'Set File Path
Private Sub Dir1_Click()
File1.Path = Dir1.List(Dir1.ListIndex)
End Sub

'Set File Pattern
Private Sub Combo1_Click()
File1.Pattern = Combo1.Text
End Sub

'Load Picture to Pricture Box
Private Sub File1_Click()
Picture1.Picture = LoadPicture(File1.Path & "\" & File1.List(File1.ListIndex))
End Sub

Best Regards