You are on page 1of 2

Private Sub Combo1_Change()

If Combo1.ListIndex = 0 Then
File1.Pattern = ("*.bmp;*.wmf;*.jpg;*.gif")
ElseIf Combo1.ListIndex = 1 Then
File1.Pattern = ("*.bmp")
ElseIf Combo1.ListIndex = 2 Then
File1.Pattern = ("*.jpg")
ElseIf Combo1.ListIndex = 3 Then
File1.Pattern = ("*.gif")
ElseIf Combo1.ListIndex = 4 Then
File1.Pattern = ("*.*")
End If
End Sub
Private Sub Combo1_Click()
Combo1_Change
End Sub
Private Sub command1_Click()
Image1.Visible = True
If Right(File1.FileName, 3) = "jpg" Or Right(File1.FileName, 3) = "bmp" Or Right
(File1.FileName, 3) = "gif" Then
Image1.Picture = LoadPicture(Text1.Text)
Else
MsgBox ("File Is Not Supported!")
End If
End Sub
Private Sub Dir1_Change()
File1.Path = Dir1.Path
File1.Pattern = ("*.bmp;*.wmf;*.jpg;*.gif")
End Sub

Private Sub Drive1_Change()


Dir1.Path = Drive1.Drive

End Sub
Private Sub File1_Click()
FileNam = File1.Path + "\" + File1.FileName
Text1.Text = FileNam
End Sub
Private Sub File1_dblClick()
Image1.Visible = True
If Right(File1.FileName, 3) = "jpg" Or Right(File1.FileName, 3) = "bmp" Or Right
(File1.FileName, 3) = "gif" Then
Image1.Picture = LoadPicture(Text1.Text)
Else
MsgBox ("File Is Not Supported!")
End If
End Sub
Private Sub Form_Load()
File1.Pattern = ("*.bmp;*.wmf;*.jpg;*.gif")
Text1.Text = ""
Left = (Screen.Width - Width) \ 2
Top = (Screen.Height - Height) \ 2

Combo1.Text = "All graphic files"


Combo1.AddItem "All graphic files"
Combo1.AddItem "All Bmp files"
Combo1.AddItem "All jpg files"
Combo1.AddItem "All gif files"
Combo1.AddItem "All Files"

End Sub

You might also like