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

📄 frmbackup.frm

📁 这是一个选课系统
💻 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 frmbackup 
   BorderStyle     =   0  'None
   Caption         =   "Form1"
   ClientHeight    =   3600
   ClientLeft      =   4005
   ClientTop       =   3045
   ClientWidth     =   7125
   LinkTopic       =   "Form1"
   ScaleHeight     =   3600
   ScaleWidth      =   7125
   ShowInTaskbar   =   0   'False
   Begin MSComDlg.CommonDialog CommonDialog1 
      Left            =   6000
      Top             =   360
      _ExtentX        =   847
      _ExtentY        =   847
      _Version        =   393216
   End
   Begin VB.Frame Frame1 
      Height          =   2415
      Left            =   360
      TabIndex        =   1
      Top             =   840
      Width           =   6375
      Begin VB.CommandButton Command3 
         Caption         =   "放弃保存数据"
         Height          =   375
         Left            =   3600
         TabIndex        =   7
         Top             =   1680
         Width           =   1935
      End
      Begin VB.CommandButton Command2 
         Caption         =   "开始保存数据"
         Height          =   375
         Left            =   360
         TabIndex        =   6
         Top             =   1680
         Width           =   2055
      End
      Begin MSComctlLib.ProgressBar progress 
         Height          =   255
         Left            =   240
         TabIndex        =   5
         Top             =   960
         Width           =   6015
         _ExtentX        =   10610
         _ExtentY        =   450
         _Version        =   393216
         Appearance      =   1
      End
      Begin VB.CommandButton Command1 
         Caption         =   "..."
         Height          =   255
         Left            =   5640
         TabIndex        =   4
         Top             =   360
         Width           =   495
      End
      Begin VB.TextBox txtpathText 
         Height          =   270
         Left            =   1680
         TabIndex        =   3
         Top             =   360
         Width           =   3735
      End
      Begin VB.Label Label1 
         Caption         =   "请选择数据目录:"
         Height          =   255
         Left            =   120
         TabIndex        =   2
         Top             =   360
         Width           =   1455
      End
   End
   Begin VB.Image imgTitleMaximize 
      Height          =   195
      Left            =   5520
      Picture         =   "frmbackup.frx":0000
      ToolTipText     =   "Maximize (Disabled)"
      Top             =   120
      Visible         =   0   'False
      Width           =   195
   End
   Begin VB.Image imgTitleclose 
      Height          =   195
      Left            =   6480
      Picture         =   "frmbackup.frx":024A
      ToolTipText     =   "Close"
      Top             =   120
      Width           =   195
   End
   Begin VB.Image imgTitleHelp 
      Height          =   210
      Left            =   5880
      Picture         =   "frmbackup.frx":0494
      Stretch         =   -1  'True
      Top             =   120
      Width           =   210
   End
   Begin VB.Image imgTitleMinimize 
      Height          =   210
      Left            =   6120
      Picture         =   "frmbackup.frx":06DE
      Stretch         =   -1  'True
      Top             =   120
      Width           =   210
   End
   Begin VB.Label lblTitle 
      AutoSize        =   -1  'True
      BackStyle       =   0  'Transparent
      Caption         =   "数据库备份"
      BeginProperty Font 
         Name            =   "Arial"
         Size            =   9.75
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00FFFFFF&
      Height          =   240
      Left            =   2280
      TabIndex        =   0
      Top             =   240
      Width           =   1275
   End
   Begin VB.Image Imageicon 
      Height          =   315
      Left            =   1560
      Picture         =   "frmbackup.frx":0928
      Stretch         =   -1  'True
      Top             =   240
      Width           =   315
   End
   Begin VB.Image imgWindowLeft 
      Height          =   450
      Left            =   1080
      Picture         =   "frmbackup.frx":11F2
      Stretch         =   -1  'True
      Top             =   480
      Width           =   285
   End
   Begin VB.Image imgWindowRight 
      Height          =   450
      Left            =   720
      Picture         =   "frmbackup.frx":193C
      Stretch         =   -1  'True
      Top             =   480
      Width           =   285
   End
   Begin VB.Image imgTitleLeft 
      Height          =   450
      Left            =   0
      Picture         =   "frmbackup.frx":2086
      Top             =   0
      Width           =   285
   End
   Begin VB.Image imgTitleRight 
      Height          =   450
      Left            =   360
      Picture         =   "frmbackup.frx":27D0
      Top             =   0
      Width           =   285
   End
   Begin VB.Image imgWindowBottom 
      Height          =   450
      Left            =   360
      Picture         =   "frmbackup.frx":2F1A
      Stretch         =   -1  'True
      Top             =   480
      Width           =   285
   End
   Begin VB.Image imgTitleMain 
      Height          =   450
      Left            =   0
      Picture         =   "frmbackup.frx":3664
      Stretch         =   -1  'True
      Top             =   450
      Width           =   285
   End
   Begin VB.Image imgWindowBottomLeft 
      Height          =   450
      Left            =   720
      Picture         =   "frmbackup.frx":3DAE
      Top             =   0
      Width           =   285
   End
   Begin VB.Image imgWindowBottomRight 
      Height          =   450
      Left            =   1080
      Picture         =   "frmbackup.frx":44F8
      Top             =   0
      Width           =   285
   End
End
Attribute VB_Name = "frmbackup"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False

Private Sub Command1_Click()
 
 CommonDialog1.FontName = ""
 CommonDialog1.Flags = 512
 CommonDialog1.InitDir = "d:\temp"
 CommonDialog1.Filter = "备份文件(*.bak)|*.bak "
 CommonDialog1.ShowSave
 txtpathText.Text = CommonDialog1.filename
End Sub


Private Sub Command2_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
 Dim strsql As String
 Dim conn As New ADODB.Connection
 Dim connstrings As String
  Dim counter As Integer
  progress.Min = 0
  progress.Max = 1000
  progress.Visible = True
  progress.Value = progress.Min
 connstrings = "driver={SQL Server};server=" + Trim(Server) + ";Trusted_Connection=yes;database=stuchoose"
    
  strsql = "backup database stuchoose to disk='" & txtpathText.Text & "'"
 
   conn.Open connstrings
  
If (Len(Trim(txtpathText.Text)) = 0) Then
        Result = MsgBox("请指定所要备份数据的路径!", vbOKOnly, "数据备份")
        Exit Sub
Else
  For counter = 0 To 1000
    progress.Value = counter
  Next counter
' Call sDoDB("备份", "(local)", "stuchoose", "sa", "")
 conn.Execute (strsql)
   progress.Visible = False
   progress.Value = progress.Min
   Result = MsgBox("本系统数据库中的数据备份完毕,请保存数据备份目录下的数据备份文件!", vbOKOnly, "数据备份")
   Unload Me
End If
    Exit Sub
End Sub

Private Sub Command3_Click()
 Unload Me
End Sub

Private Sub Form_Load()
  MakeWindow Me
progress.Visible = False
End Sub
Private Sub imgTitleclose_Click()
    intNumField = -2
    Unload Me
End Sub

Private Sub imgTitleLeft_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
    DoDrag Me
End Sub

Private Sub imgTitleMain_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
    DoDrag Me
End Sub

Private Sub imgTitleMinimize_Click()
    Me.WindowState = 1
End Sub

Private Sub imgTitleRight_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
    DoDrag Me
End Sub

Private Sub lblTitle_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
    DoDrag Me
End Sub


⌨️ 快捷键说明

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