show picture vb

Download Show Picture Vb

If you can't read please download the document

Upload: avatarzzzz

Post on 03-Oct-2015

218 views

Category:

Documents


4 download

DESCRIPTION

Show Picture Vb

TRANSCRIPT

'=========================================================Private Sub drvSelector_Change()'Lists folders under a given directory or device Dim s1 As String s1 = drvSelector 'gets drive name dirSelector.Path = s1 'lists folders in driveEnd Sub'=========================================================Private Sub dirSelector_Change()'Lists files under a given folder Dim s1 As String s1 = dirSelector 'gets folder name filSelector.Path = s1 'lists files in the folderEnd Sub'=========================================================Private Sub cmdFindImage_Click()'First option for getting a file name:'Open selected file by clicking on "cmdOpenFile" Call getFileNameEnd Sub'=========================================================Private Sub filSelector_DblClick()'Second option for getting a file name:'Open selected file by double-clicking on a file name Call getFileNameEnd Sub'=========================================================Private Sub getFileName()'Gets the name of the selected file Dim s1 As String, s2 As String Dim filName As String 'The next three lines put together the filename s1 = dirSelector 'Gets the drive name (e.g.,"c:\") s2 = filSelector 'Gets the file name (e.g., "myFile") filName = s1 & "\" & s2 'E.g., filName = "c:\myFile" ' imgMyPicture = LoadPicture(filName) End Sub'=========================================================Private Sub Form_Load()End Sub