On my form I have a DriveListBox, DirListBox, FileListBox, two text fields, txtFile1 and txtFile2 and two picture boxes Picture 1 and Picture 2. What I want to do is use the same controls to load a jpg image into picture1 and another jpg image into picture2. I have my controls to setup to load my image into picture1. How do I reset the controls so I can add another image into Picture2?![]()
VB Code:
'//////////// SELECT FOLDER FROM DRIVE ////////////////////// Private Sub Drive1_Change() Dir1.Path = Drive1.Drive End Sub '//////// SELECT DRIVE LETTER FROM LOCAL HARD DRIVE ///////////////// Private Sub Dir1_Change() File1.Path = Dir1.Path End Sub '/////////// PUT FILE NAME 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 Picture1.Picture = LoadPicture(Dir1.Path & "\" & File1.FileName) End Sub




Reply With Quote