home *** CD-ROM | disk | FTP | other *** search
- VERSION 4.00
- Begin VB.Form Form1
- Caption = "Picture Viewer"
- ClientHeight = 4830
- ClientLeft = 1065
- ClientTop = 1695
- ClientWidth = 7395
- ClipControls = 0 'False
- BeginProperty Font
- name = "MS Sans Serif"
- charset = 1
- weight = 700
- size = 8.25
- underline = 0 'False
- italic = 0 'False
- strikethrough = 0 'False
- EndProperty
- Height = 5235
- Left = 1005
- LinkTopic = "Form1"
- ScaleHeight = 4830
- ScaleWidth = 7395
- Top = 1350
- Width = 7515
- Begin VB.CommandButton Command1
- Caption = "E&xit"
- Height = 495
- Left = 5520
- TabIndex = 4
- Top = 4080
- Width = 1215
- End
- Begin VB.FileListBox File1
- Height = 1395
- Left = 600
- Pattern = "*.bmp;*.wmf;*.ico"
- TabIndex = 2
- Top = 2400
- Width = 2895
- End
- Begin VB.DirListBox Dir1
- Height = 1575
- Left = 600
- TabIndex = 1
- Top = 720
- Width = 2895
- End
- Begin VB.DriveListBox Drive1
- Height = 1530
- Left = 600
- TabIndex = 0
- Top = 360
- Width = 2895
- End
- Begin VB.Label Label1
- BorderStyle = 1 'Fixed Single
- Height = 495
- Left = 3720
- TabIndex = 3
- Top = 3255
- Width = 3015
- End
- Begin VB.Image Open
- BorderStyle = 1 'Fixed Single
- Height = 2775
- Left = 3720
- Stretch = -1 'True
- Top = 360
- Width = 3015
- End
- Attribute VB_Name = "Form1"
- Attribute VB_Creatable = False
- Attribute VB_Exposed = False
- Private Sub Command1_Click()
- Unload Me
- End
- End Sub
- Private Sub Dir1_Change()
- ' When the directory is changed, update the path in the file list box control.
- file1.Path = Dir1.Path
- End Sub
- Private Sub Drive1_Change()
- ' When the drive is changed, update the directory list box control.
- ' (This also triggers the Dir1_Change event for the directory list box control).
- Dir1.Path = Drive1.Drive
- End Sub
- Private 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
- Private Sub Form_Load()
- ' Set the drive and path for the controls to the drive
- ' and directory where this application is located.
- Drive1.Drive = App.Path
- Dir1.Path = App.Path
- End Sub
-