📄 vbtozip.frm
字号:
VERSION 5.00
Begin VB.Form frmvbtozip
Caption = "压缩文件(调用WINZIP)"
ClientHeight = 3195
ClientLeft = 60
ClientTop = 345
ClientWidth = 4245
LinkTopic = "Form1"
ScaleHeight = 3195
ScaleWidth = 4245
StartUpPosition = 3 'Windows Default
Begin VB.TextBox Text2
Height = 495
Left = 1680
TabIndex = 2
Text = "1.zip"
Top = 1200
Width = 1215
End
Begin VB.TextBox Text1
Height = 495
Left = 1680
TabIndex = 1
Text = "d:\1.mdb"
Top = 360
Width = 1215
End
Begin VB.CommandButton Command1
Caption = "压缩"
Height = 495
Left = 1440
TabIndex = 0
Top = 2160
Width = 1095
End
Begin VB.Label Label2
AutoSize = -1 'True
Caption = "目的文件"
Height = 180
Left = 480
TabIndex = 4
Top = 1320
Width = 720
End
Begin VB.Label Label1
AutoSize = -1 'True
Caption = "原始文件"
Height = 180
Left = 480
TabIndex = 3
Top = 480
Width = 720
End
End
Attribute VB_Name = "frmvbtozip"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private Sub Command1_Click()
Dim wzipexe As String ' winzip 执行文件的位置
Dim wsource As String ' 原始文件 (压缩前)
Dim wtarget As String ' 目地文件 (压缩后)
Dim wcmd As String ' Shell 指令
Dim retval As Double ' Shell 指令传回值
' Shell 指令
wzipexe = "C:\program files\winzip\WINzip32" ' winzip 执行文件的位置
wtarget = Text2.Text ' 目地文件 (压缩后)
wsource = Text1.Text ' 原始文件 (压缩前)
wcmd = wzipexe & " -a " & wtarget & " " & wsource
retval = Shell(wcmd, 6)
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -