⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 arjzip.frm

📁 不错的一个VB菜单设计 界面和功能都不错
💻 FRM
字号:
VERSION 5.00
Object = "{75D4F148-8785-11D3-93AD-0000832EF44D}#3.1#0"; "FAST2003.ocx"
Object = "{75D4F666-8785-11D3-93AD-0000832EF44D}#3.0#0"; "FAST2006.ocx"
Begin VB.Form frmARJZIP 
   BorderStyle     =   3  'Fixed Dialog
   Caption         =   "File information"
   ClientHeight    =   7605
   ClientLeft      =   2340
   ClientTop       =   2220
   ClientWidth     =   8865
   BeginProperty Font 
      Name            =   "MS Sans Serif"
      Size            =   8.25
      Charset         =   0
      Weight          =   700
      Underline       =   0   'False
      Italic          =   0   'False
      Strikethrough   =   0   'False
   EndProperty
   ForeColor       =   &H80000008&
   Icon            =   "arjzip.frx":0000
   LinkMode        =   1  'Source
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   PaletteMode     =   1  'UseZOrder
   ScaleHeight     =   7605
   ScaleWidth      =   8865
   ShowInTaskbar   =   0   'False
   StartUpPosition =   2  'CenterScreen
   Begin VB.TextBox txtFiles 
      BackColor       =   &H8000000F&
      BeginProperty Font 
         Name            =   "Courier New"
         Size            =   9.75
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   3570
      Left            =   90
      Locked          =   -1  'True
      MultiLine       =   -1  'True
      ScrollBars      =   3  'Both
      TabIndex        =   9
      Top             =   3960
      Width           =   8655
   End
   Begin VB.ComboBox cboType 
      Height          =   315
      ItemData        =   "arjzip.frx":0442
      Left            =   2790
      List            =   "arjzip.frx":044C
      Style           =   2  'Dropdown List
      TabIndex        =   8
      Top             =   3510
      Width           =   2805
   End
   Begin VB.CommandButton cmdInfo 
      Caption         =   "&Get Information"
      Default         =   -1  'True
      Height          =   465
      Left            =   6165
      TabIndex        =   7
      Top             =   3375
      Width           =   2040
   End
   Begin VB.DriveListBox drvUnits 
      Height          =   315
      Left            =   2790
      TabIndex        =   5
      Top             =   2970
      Width           =   2805
   End
   Begin VB.DirListBox dirDirectories 
      Height          =   1890
      Left            =   2790
      TabIndex        =   3
      Top             =   765
      Width           =   2835
   End
   Begin VB.FileListBox filFiles 
      Height          =   3405
      Left            =   75
      TabIndex        =   1
      Top             =   405
      Width           =   2565
   End
   Begin FLWDiskFile.FWCompress objCompress 
      Left            =   8160
      Top             =   1470
      _ExtentX        =   820
      _ExtentY        =   820
   End
   Begin FLWSystem.FWSysInfo objSysInfo 
      Left            =   8130
      Top             =   945
      _ExtentX        =   820
      _ExtentY        =   820
   End
   Begin VB.Label lblDirectory 
      AutoSize        =   -1  'True
      BackStyle       =   0  'Transparent
      Caption         =   "c:\"
      Height          =   195
      Left            =   2790
      TabIndex        =   6
      Top             =   135
      Width           =   270
   End
   Begin VB.Label lblLabel 
      AutoSize        =   -1  'True
      BackStyle       =   0  'Transparent
      Caption         =   "&Units"
      Height          =   195
      Index           =   2
      Left            =   2790
      TabIndex        =   4
      Top             =   2760
      Width           =   450
   End
   Begin VB.Label lblLabel 
      AutoSize        =   -1  'True
      BackStyle       =   0  'Transparent
      Caption         =   "&Directories"
      Height          =   195
      Index           =   3
      Left            =   2790
      TabIndex        =   2
      Top             =   495
      Width           =   930
   End
   Begin VB.Label lblLabel 
      AutoSize        =   -1  'True
      BackStyle       =   0  'Transparent
      Caption         =   "&Files"
      Height          =   195
      Index           =   0
      Left            =   90
      TabIndex        =   0
      Top             =   135
      Width           =   405
   End
End
Attribute VB_Name = "frmARJZIP"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit

 
Private Sub cboType_Click()
  If cboType.ListIndex = 0 Then
    filFiles.Pattern = "*.zip"
  Else
    filFiles.Pattern = "*.arj"
  End If
End Sub

Private Sub cmdInfo_Click()
  Dim intType   As FLWDiskFile.flwCompressMode
  Dim objFile   As FLWDiskFile.IFWCompressFile
  Dim strBuffer As String
  Dim strPath   As String
  
  If cboType.ListIndex = 0 Then
    intType = FLWDiskFile.flwCompressZIP
  Else
    intType = FLWDiskFile.flwCompressARJ
  End If
  strPath = dirDirectories.Path
  If Right(strPath, 1) <> "\" Then
    strPath = strPath & "\"
  End If
  If objCompress.Create(strPath & filFiles.FileName, intType) Then
    strBuffer = "Name         Date      Time      Size      Compressed  Ratio   Method      Fullname" & vbCrLf & _
                "-----------------------------------------------------------------------------------" & vbCrLf
    For Each objFile In objCompress.Files
      strBuffer = strBuffer & _
                  Pad(objFile.Name, 13) & _
                  Pad(objFile.FileDate, 10) & _
                  Pad(objFile.FILETIME, 10) & _
                  Pad(objFile.RealSize, 10) & _
                  Pad(objFile.CompressedSize, 12) & _
                  Pad(objFile.Ratio, 8) & _
                  Pad(objFile.Method, 12) & _
                  objFile.FullName & vbCrLf
    Next
    txtFiles = strBuffer
  Else
    txtFiles = ""
    Call MsgBox("Error reading the ZIP or ARJ file or the file does not exists")
  End If
End Sub

Private Sub Form_Load()
  Dim strBuffer As String
 
  cboType.ListIndex = 0
  
  strBuffer = objSysInfo.Windows
    
  dirDirectories.Path = strBuffer
  filFiles.Path = strBuffer
  drvUnits.Drive = Left$(strBuffer, 1)
End Sub
 
Private Sub dirDirectories_Change()
  filFiles.Path = dirDirectories.Path
  lblDirectory.Caption = filFiles.Path
End Sub
 
Private Sub drvUnits_Change()
  dirDirectories.Path = drvUnits.Drive
  filFiles.Path = dirDirectories.Path
  lblDirectory.Caption = filFiles.Path
End Sub
 
Private Sub filFiles_DblClick()
  cmdInfo.Value = True
End Sub

Private Function Pad(ByVal strBuffer As String, _
                     ByVal intSize As Integer) As String
  If intSize < Len(strBuffer) Then
    Pad = Left(strBuffer, intSize)
  Else
    Pad = strBuffer & Space(intSize - Len(strBuffer))
  End If
End Function

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -