home *** CD-ROM | disk | FTP | other *** search
- VERSION 2.00
- Begin Form Form1
- Caption = "Picture Viewer"
- ClipControls = 0 'False
- Height = 5250
- Left = 1020
- LinkTopic = "Form1"
- ScaleHeight = 4845
- ScaleWidth = 7365
- Top = 1320
- Width = 7485
- Begin CommandButton Command1
- Caption = "E&xit"
- Height = 495
- Left = 5520
- TabIndex = 4
- Top = 4080
- Width = 1215
- End
- Begin FileListBox File1
- Height = 1395
- Left = 600
- Pattern = "*.bmp;*.wmf;*.ico"
- TabIndex = 2
- Top = 2400
- Width = 2895
- End
- Begin DirListBox Dir1
- Height = 1575
- Left = 600
- TabIndex = 1
- Top = 720
- Width = 2895
- End
- Begin DriveListBox Drive1
- Height = 1530
- Left = 600
- TabIndex = 0
- Top = 360
- Width = 2895
- End
- Begin Label Label1
- BorderStyle = 1 'Fixed Single
- Height = 495
- Left = 3720
- TabIndex = 3
- Top = 3240
- Width = 3015
- End
- Begin Image open
- BorderStyle = 1 'Fixed Single
- Height = 2775
- Left = 3720
- Stretch = -1 'True
- Top = 360
- Width = 3015
- End
- Sub Command1_Click ()
- End
- End Sub
- Sub Dir1_Change ()
- ' When directory is changed, update path in Files control.
- file1.Path = Dir1.Path
- End Sub
- Sub Drive1_Change ()
- ' When drive is changed, update directory control.
- ' (This also causes a Change event for the directory control).
- Dir1.Path = Drive1.Drive
- End Sub
- Sub File1_DblClick ()
- ' When at the root level (for example, C:\) the Path property
- ' has a backslash (\) at the end. When at any other level,
- ' there is no final \. This code handles either case to build
- ' the complete path and filename of the selected file.
- If Right(file1.Path, 1) <> "\" Then
- label1.Caption = file1.Path & "\" & file1.FileName
- Else
- label1.Caption = file1.Path & file1.FileName
- End If
- ' Load the selected picture file.
- Form1.open.Picture = LoadPicture(label1.Caption)
- End Sub
- Sub Form_Load ()
- ' Set drive and path for controls to drive
- ' and directory where this application is located.
- Drive1.Drive = App.Path
- Dir1.Path = App.Path
- End Sub
-