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

📄 frm_backup.frm

📁 VB物流管理系统毕业设计带源码源码+论文 vB+sql的毕业设计
💻 FRM
字号:
VERSION 5.00
Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "mscomctl.ocx"
Object = "{F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.2#0"; "comdlg32.ocx"
Begin VB.Form frm_backup 
   Caption         =   "数据备份"
   ClientHeight    =   3885
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   5805
   LinkTopic       =   "Form1"
   LockControls    =   -1  'True
   MaxButton       =   0   'False
   ScaleHeight     =   3885
   ScaleWidth      =   5805
   StartUpPosition =   3  '窗口缺省
   Begin VB.PictureBox Picture1 
      Height          =   3265
      Left            =   50
      Picture         =   "frm_backup.frx":0000
      ScaleHeight     =   3210
      ScaleWidth      =   1995
      TabIndex        =   9
      Top             =   100
      Width           =   2055
   End
   Begin VB.TextBox Text3 
      Height          =   270
      Left            =   3120
      TabIndex        =   8
      Text            =   "Text3"
      Top             =   5400
      Width           =   1215
   End
   Begin VB.CommandButton Cmd_Cancel 
      Caption         =   "取消"
      Height          =   375
      Left            =   4660
      TabIndex        =   4
      Top             =   3450
      Width           =   1095
   End
   Begin VB.Frame Frame1 
      Height          =   3375
      Left            =   2150
      TabIndex        =   0
      Top             =   20
      Width           =   3615
      Begin MSComDlg.CommonDialog CommonDialog1 
         Left            =   2520
         Top             =   1680
         _ExtentX        =   847
         _ExtentY        =   847
         _Version        =   393216
      End
      Begin VB.CommandButton Cmd_Select 
         Caption         =   "<<"
         Height          =   310
         Left            =   3120
         TabIndex        =   6
         Top             =   2520
         Width           =   375
      End
      Begin MSComctlLib.ProgressBar ProgressBar1 
         Height          =   300
         Left            =   120
         TabIndex        =   5
         Top             =   3000
         Width           =   3375
         _ExtentX        =   5953
         _ExtentY        =   529
         _Version        =   393216
         Appearance      =   1
      End
      Begin VB.TextBox Text1 
         Height          =   300
         Left            =   120
         TabIndex        =   2
         Top             =   2520
         Width           =   3015
      End
      Begin VB.Label Label3 
         BackStyle       =   0  'Transparent
         Caption         =   "单击“<<”图标按钮,选择一个要备份数据的文件夹,然后单击“开始备份”按钮开始备份数据"
         Height          =   615
         Index           =   1
         Left            =   480
         TabIndex        =   7
         Top             =   960
         Width           =   2775
      End
      Begin VB.Label Label1 
         BackStyle       =   0  'Transparent
         Caption         =   "选择数据库备份路径"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   10.5
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H00C000C0&
         Height          =   375
         Left            =   120
         TabIndex        =   1
         Top             =   2160
         Width           =   2535
      End
   End
   Begin VB.CommandButton Cmd_BackUp 
      Caption         =   "开始备份"
      Height          =   375
      Left            =   3480
      TabIndex        =   3
      Top             =   3450
      Width           =   1095
   End
End
Attribute VB_Name = "frm_backup"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim StrCnn As New Connection     '定义连接
Dim key, list, sql As String     '定义字符串变量

Private Sub Cmd_BackUp_Click()
Cmd_BackUp.Enabled = False
Me.MousePointer = 11
If Text1.Text = "" Then
   MsgBox "请您选择数据库备份的路径!", 64, "提示信息"
Else
Dim connter As Integer
Dim sql, workarea(12) As String
ProgressBar1.Visible = True
ProgressBar1.Max = UBound(workarea)
ProgressBar1.Value = ProgressBar1.Min
   For connter = LBound(workarea) To UBound(workarea)
       workarea(connter) = "initial value" & connter
       ProgressBar1.Value = connter
            StrCnn.Open PublicStr
            sql = "backup DATABASE db_Goods TO disk='" & Text1.Text & "'"
            StrCnn.Execute (sql)     '执行SQL语句
            StrCnn.Close
  Next connter
  ProgressBar1.Value = ProgressBar1.Min
  MsgBox "数据库备份成功!!", 64, "提示信息"
  Cmd_BackUp.Enabled = True
  Me.MousePointer = 0
 End If
End Sub
Private Sub Cmd_Cancel_Click()
   Unload Me
End Sub
Private Sub Cmd_Select_Click()
   CommonDialog1.Filter = "备份文件(*.bak)|*.bak|文本文件(*.txt)|*.txt|ALL File(*.*)|*.*"
   CommonDialog1.ShowSave
   Text1.Text = CommonDialog1.FileName
End Sub
Private Sub Form_Load()
   Me.Left = (Screen.Width - Me.Width) / 2
   Me.Top = (Screen.Height - Me.Height) / 2
End Sub

⌨️ 快捷键说明

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