select the image from fielistbox
I use filelistbox, drivelistbox and dirlistbox
I have problem.. I can see the image file in filelistbox when I browse the file.How I can select the file from filelistbox and click the button to view the image?
Code:
For i = 0 To File1.ListCount - 1
strFullPath = Dir1.Path & "\" & File1.List(i)
next i
Re: select the image from fielistbox
Code:
Private Const SW_SHOWNORMAL = 1
Private Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" ( _
ByVal Hwnd As Long, _
ByVal lpszOp As String, _
ByVal lpszFile As String, _
ByVal lpszParams As String, _
ByVal lpszDir As String, _
ByVal FsShowCmd As Long) _
As Long
Private Declare Function GetDesktopWindow Lib "user32" () As Long
Private Sub File1_DblClick()
Call ShellExecute(GetDesktopWindow, "Open", IIf(Right$(File1.Path, 1) = "\", File1.Path, File1.Path & "\") & File1.FileName, "", "c:", SW_SHOWNORMAL)
End Sub