home *** CD-ROM | disk | FTP | other *** search
- VERSION 2.00
- Begin Form frmCmDialog
- BackColor = &H00C0C0C0&
- BorderStyle = 3 'Fixed Double
- Caption = "Form1"
- ClientHeight = 3285
- ClientLeft = 1500
- ClientTop = 4470
- ClientWidth = 6945
- Height = 3690
- Left = 1440
- LinkTopic = "Form1"
- MaxButton = 0 'False
- MinButton = 0 'False
- ScaleHeight = 3285
- ScaleWidth = 6945
- Top = 4125
- Width = 7065
- Begin ComboBox cboFileTypes
- Height = 300
- Left = 120
- Style = 2 'Dropdown List
- TabIndex = 4
- Top = 2760
- Width = 2535
- End
- Begin TextBox txtFilename
- Height = 285
- Left = 120
- TabIndex = 1
- Top = 360
- Width = 2535
- End
- Begin CommandButton cmdCancel
- Cancel = -1 'True
- Caption = "Cancel"
- Height = 375
- Left = 5520
- TabIndex = 9
- Top = 600
- Width = 1335
- End
- Begin CommandButton cmdOK
- Caption = "OK"
- Default = -1 'True
- Height = 375
- Left = 5520
- TabIndex = 8
- Top = 120
- Width = 1335
- End
- Begin FileListBox File1
- Height = 1590
- Left = 120
- Pattern = "*.zip"
- TabIndex = 2
- Top = 720
- Width = 2535
- End
- Begin DirListBox Dir1
- Height = 1605
- Left = 2880
- TabIndex = 5
- Top = 720
- Width = 2535
- End
- Begin DriveListBox Drive1
- Height = 315
- Left = 2880
- TabIndex = 7
- Top = 2760
- Width = 2535
- End
- Begin Label Label3
- BackStyle = 0 'Transparent
- Caption = "List Files of &Type:"
- Height = 255
- Left = 120
- TabIndex = 3
- Top = 2520
- Width = 2535
- End
- Begin Label Label2
- BackStyle = 0 'Transparent
- Caption = "Dri&ves:"
- Height = 255
- Left = 2880
- TabIndex = 6
- Top = 2520
- Width = 1335
- End
- Begin Label Label1
- BackStyle = 0 'Transparent
- Caption = "File &Name:"
- Height = 255
- Left = 120
- TabIndex = 0
- Top = 120
- Width = 2655
- End
- Option Explicit
- Sub cboFileTypes_Click ()
- Select Case cboFileTypes.ListIndex
- Case 0
- File1.Pattern = "*.zip"
- Case 1
- File1.Pattern = "*.*"
- End Select
- File1.Refresh
- End Sub
- Sub cmdCancel_Click ()
- Unload Me
- End Sub
- Sub cmdOK_Click ()
- g_cFile = Dir1.Path
- If (Right$(g_cFile, 1) <> "\") Then g_cFile = g_cFile & "\"
- g_cFile = g_cFile & txtFilename.Text
- If (g_iNew) Then
- If (txtFilename.Text = "") Then
- MsgBox "No filename entered!", 16, "Error"
- Exit Sub
- End If
- Else
- If ((txtFilename.Text = "") Or (Dir$(g_cFile) = "")) Then
- MsgBox g_cFile & " does not exist or is not a valid filename.", 16, "Error"
- Exit Sub
- End If
- End If
- Unload Me
- End Sub
- Sub Dir1_Change ()
- File1.Path = Dir1.Path ' When Dir changes, set File path.
- End Sub
- Sub Draw3D (a As Control)
- Me.Line (a.Left - 10, a.Top - 10)-Step(10, a.Height + 20), RGB(128, 128, 128), BF
- Me.Line (a.Left - 10, a.Top - 10)-Step(a.Width + 20, 10), RGB(128, 128, 128), BF
- Me.Line (a.Left + a.Width, a.Top - 10)-Step(10, a.Height + 20), RGB(255, 255, 255), BF
- Me.Line (a.Left - 10, a.Top + a.Height)-Step(a.Width + 20, 10), RGB(255, 255, 255), BF
- End Sub
- Sub Drive1_Change ()
- Dir1.Path = Drive1.Drive ' When Drive changes, set Dir path.
- End Sub
- Sub File1_Click ()
- txtFilename.Text = File1.List(File1.ListIndex)
- End Sub
- Sub File1_DblClick ()
- cmdOK_Click
- End Sub
- Sub Form_Load ()
- Dim I As Integer
- ' centre the form on screen
- Move screen.Width / 2 - Me.Width / 2, screen.Height / 2 - Me.Height / 2
- If (frmQuickZIP.mnuOptionsOnTop.Checked = True) Then
- I = SetWindowPos(Me.hWnd, HWND_TOPMOST, 0, 0, 0, 0, FLAGS)
- Else
- I = SetWindowPos(Me.hWnd, HWND_NOTOPMOST, 0, 0, 0, 0, FLAGS)
- End If
- cboFileTypes.AddItem ".ZIP archives (*.zip)"
- cboFileTypes.AddItem "All files (*.*)"
- cboFileTypes.ListIndex = 0
- Form_Colour Me
- End Sub
- Sub Form_Paint ()
- Call Draw3D(File1)
- Call Draw3D(Dir1)
- Call Draw3D(Drive1)
- Call Draw3D(txtFilename)
- Call Draw3D(cboFileTypes)
- End Sub
-