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

📄 form35.frm

📁 华城酒店管理系统
💻 FRM
字号:
VERSION 5.00
Begin VB.Form Form35 
   BorderStyle     =   4  'Fixed ToolWindow
   Caption         =   "数据库修复和压缩!"
   ClientHeight    =   2910
   ClientLeft      =   45
   ClientTop       =   315
   ClientWidth     =   7440
   ForeColor       =   &H000000FF&
   LinkTopic       =   "Form35"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   2910
   ScaleWidth      =   7440
   ShowInTaskbar   =   0   'False
   StartUpPosition =   1  '所有者中心
   Begin VB.Frame Frame11 
      Height          =   2865
      Left            =   120
      TabIndex        =   0
      Top             =   0
      Width           =   7245
      Begin VB.CommandButton Command3 
         Caption         =   "开始修复(&P)"
         Height          =   390
         Left            =   5490
         TabIndex        =   3
         Top             =   2205
         Width           =   1530
      End
      Begin VB.TextBox txtPath 
         Height          =   300
         Left            =   315
         Locked          =   -1  'True
         TabIndex        =   2
         ToolTipText     =   "不能修改需要压缩或修复数据库"
         Top             =   1785
         Width           =   6690
      End
      Begin VB.CommandButton Command1 
         Caption         =   "开始压缩(&S)"
         Height          =   390
         Left            =   3900
         TabIndex        =   1
         Top             =   2205
         Width           =   1530
      End
      Begin VB.Label Label2 
         AutoSize        =   -1  'True
         BackStyle       =   0  'Transparent
         Caption         =   "如果数据量较大,请每15天压缩一次数据库,这样系统运行速度将加快20%。"
         ForeColor       =   &H000000FF&
         Height          =   180
         Index           =   1
         Left            =   720
         TabIndex        =   9
         Top             =   840
         Width           =   5850
      End
      Begin VB.Label Label2 
         AutoSize        =   -1  'True
         BackStyle       =   0  'Transparent
         Caption         =   "注意:请关闭该系统的其它程序,然后再进行数据压缩,否则压缩可能出错或数据丢失。"
         ForeColor       =   &H000000FF&
         Height          =   180
         Index           =   0
         Left            =   120
         TabIndex        =   8
         Top             =   600
         Width           =   6930
      End
      Begin VB.Shape Shape2 
         FillColor       =   &H00E0E0E0&
         FillStyle       =   0  'Solid
         Height          =   735
         Left            =   90
         Shape           =   4  'Rounded Rectangle
         Top             =   420
         Width           =   7065
      End
      Begin VB.Line Line1 
         BorderColor     =   &H00FFFFFF&
         Index           =   1
         X1              =   120
         X2              =   7125
         Y1              =   1170
         Y2              =   1170
      End
      Begin VB.Line Line1 
         BorderColor     =   &H00808080&
         Index           =   2
         X1              =   105
         X2              =   7125
         Y1              =   405
         Y2              =   405
      End
      Begin VB.Label Label2 
         AutoSize        =   -1  'True
         BackStyle       =   0  'Transparent
         Caption         =   "注意:请关闭该系统的其它程序,然后再进行数据压缩,否则压缩可能出错或数据丢失。"
         ForeColor       =   &H00808000&
         Height          =   180
         Index           =   3
         Left            =   195
         TabIndex        =   7
         Top             =   585
         Width           =   6930
      End
      Begin VB.Label Label12 
         AutoSize        =   -1  'True
         Caption         =   "被压缩的数据库路径:"
         Height          =   180
         Left            =   345
         TabIndex        =   6
         Top             =   1515
         Width           =   1710
      End
      Begin VB.Label Label2 
         AutoSize        =   -1  'True
         BackStyle       =   0  'Transparent
         Caption         =   "如果数据量较大,请每15天压缩一次数据库,这样系统运行速度将加快20%。"
         ForeColor       =   &H00808000&
         Height          =   180
         Index           =   4
         Left            =   750
         TabIndex        =   5
         Top             =   840
         Width           =   5850
      End
      Begin VB.Label Label13 
         AutoSize        =   -1  'True
         BackStyle       =   0  'Transparent
         Caption         =   "注意:"
         ForeColor       =   &H000000FF&
         Height          =   180
         Left            =   195
         TabIndex        =   4
         Top             =   585
         Width           =   540
      End
   End
End
Attribute VB_Name = "Form35"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
'FIXIT: 使用 Option Explicit 可以避免隐式创建 Variant 类型的变量                                          FixIT90210ae-R383-H1984
Private Sub Command1_Click()
 On Error Resume Next
    
 Dim SB As CompressIt
 Set SB = New CompressIt

  '文件较对,如果文件不存时退出
   If Dir(txtPath.Text, vbArchive) = "" Then
      Set SB = Nothing
      MsgBox "您好!被压缩的数据库文件不存在,请重新输入后继续?   ", vbInformation
      txtPath.SetFocus
      Exit Sub
   End If
   
     SB.SourceFile = txtPath.Text
    '设置压缩后的口令
     'SB.Password = "YuSiLongLiuLi"
     SB.Compress
 
 Screen.MousePointer = 11
 If SB.Finished = True Then
    MsgBox "压缩完成!  ", vbInformation
  Else
    MsgBox "没有压缩成功? ", vbCritical
 End If
 Screen.MousePointer = 0
 
Set SB = Nothing

End Sub

Private Sub Command3_Click()

 On Error Resume Next
 
 Dim SB As CompressIt
 Set SB = New CompressIt
     
'文件较对,如果文件不存时退出
   If Dir(txtPath.Text, vbArchive) = "" Then
      Set SB = Nothing
      MsgBox "您好!被修复的数据库文件不存在,请重新输入后继续?   ", vbInformation
      txtPath.SetFocus
      Exit Sub
   End If
        
     SB.SourceFile = txtPath.Text
     SB.Repaire

 Screen.MousePointer = 11
 If SB.Repaired = True Then
    MsgBox "修复完成!  ", vbInformation
  Else
    MsgBox "没有修复成功? ", vbCritical
 End If
 Screen.MousePointer = 0
 
 Set SB = Nothing
End Sub

Private Sub Form_Load()
checkPath ""
txtPath.Text = ConData
End Sub

⌨️ 快捷键说明

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