Thumbnails on file selector

R

Rich Stone

I have a file selector routine to open an image in my database. The code is
as follows:

Private Sub ImageWindow_DblClick(Cancel As Integer)
On Error GoTo ImageWindow_Cancel

Dim CR As String
Dim fd As FileDialog
Dim FileSource As Variant
Dim FileDest As Variant

CR = Chr$(13) 'Carriage Return'

FileSource = "C:\Integ Pro\Southmids Sportsters\Images\\No-photo.gif"

Set fd = Application.FileDialog(msoFileDialogOpen)

FileDest = "C:\Integ Pro\Southmids Sportsters\Images\"

With fd
.AllowMultiSelect = False
.InitialFileName = FileDest
.Filters.Clear
.Filters.Add "Vehicle images (*.jpg,*.gif)", "*.jpg;*.gif"
.Title = "Display vehicle image"
.Show
FileSource = .SelectedItems.Item(1)
End With

ImagePath = FileSource
ImageWindow.Picture = ImagePath
Exit Sub

ImageWindow_Cancel:
X = MsgBox("The vehicle image has not been" + CR + _
"changed at this time.", vbOKOnly +
vbInformation, "Vehicle
image")

End Sub

How can I make the file selector default to displaying available images as
thumbnails so I don't have to select it each time?

Rich.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top