|
-
Feb 2nd, 2005, 09:52 AM
#1
Thread Starter
Fanatic Member
help with Dir, Drive and FileList
I am using the following code to search for "*.jpg", a property I set for the pattern in the fileListBox. I have a add button that allows me to add the content of the FileListBox. After I add the image name to my db, I clearAll, and now I am ready to add another image. But When I navigate through the dir, I can nolonger get any jpg images to appear in the FileListBox. Is there something wrong with my code?
VB Code:
'//////// SELECT DRIVE LETTER FROM LOCAL HARD DRIVE - COMPANY BIOS /////////////////
Private Sub Dir1_Change()
On Error Resume Next: File1.Path = Dir1.Path
'////// reset values to nothing as soon as you change directories
picBioImage.Picture = LoadPicture
txtfile1.Text = ""
End Sub
'//////////// SELECT FOLDER FROM DRIVE //////////////////////
Private Sub Drive1_Change()
On Error Resume Next: Dir1.Path = Drive1.Drive
End Sub
'/////////// PUT FILE INTO TEXT BOX
Private Sub File1_Click()
Dim txtPath$
txtPath$ = Dir1.Path
If Mid(txtPath$, Len(txtPath$), 1) = "\" Then
txtfile1.Text = Dir1.Path & File1.FileName
Else
txtfile1.Text = File1.FileName
End If
picBioImage.Picture = LoadPicture(Dir1.Path & "\" & File1.FileName)
End Sub
He who never made a mistake never made a discovery?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|