- VERSION 5.00
- Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "mscomctl.ocx"
- Begin VB.Form frmDb
- Caption = "物料Access数据备份恢复"
- ClientHeight = 6705
- ClientLeft = 60
- ClientTop = 420
- ClientWidth = 10110
- LinkTopic = "Form1"
- MaxButton = 0 'False
- MinButton = 0 'False
- ScaleHeight = 6705
- ScaleWidth = 10110
- StartUpPosition = 1 '所有者中心
- Begin VB.CommandButton Command2
- Caption = "退出"
- Height = 375
- Left = 5040
- TabIndex = 11
- Top = 5880
- Width = 2895
- End
- Begin VB.CommandButton Command1
- Caption = "数据备份或数据回复"
- Height = 375
- Left = 1920
- TabIndex = 10
- Top = 5880
- Width = 2895
- End
- Begin VB.Frame Frame2
- Caption = "请选择数据库文件"
- Height = 4455
- Left = 5040
- TabIndex = 4
- Top = 600
- Width = 4935
- Begin VB.FileListBox File1
- Height = 1890
- Left = 120
- TabIndex = 8
- Top = 2400
- Width = 4695
- End
- Begin VB.DirListBox Dir1
- Height = 1560
- Left = 120
- TabIndex = 7
- Top = 720
- Width = 4695
- End
- Begin VB.DriveListBox Drive1
- Height = 300
- Left = 120
- TabIndex = 6
- Top = 360
- Width = 4695
- End
- End
- Begin VB.Frame Frame1
- Caption = "备份卡列表"
- Height = 4455
- Left = 120
- TabIndex = 3
- Top = 600
- Width = 4695
- Begin MSComctlLib.ListView ListView1
- Height = 3975
- Left = 120
- TabIndex = 5
- Top = 360
- Width = 4455
- _ExtentX = 7858
- _ExtentY = 7011
- LabelWrap = -1 'True
- HideSelection = -1 'True
- _Version = 393217
- Icons = "ImageList1"
- ForeColor = -2147483640
- BackColor = -2147483643
- BorderStyle = 1
- Appearance = 1
- NumItems = 0
- End
- Begin MSComctlLib.ImageList ImageList1
- Left = 2880
- Top = 0
- _ExtentX = 1005
- _ExtentY = 1005
- BackColor = -2147483643
- ImageWidth = 32
- ImageHeight = 32
- MaskColor = 12632256
- _Version = 393216
- BeginProperty Images {2C247F25-8591-11D1-B16A-00C0F0283628}
- NumListImages = 1
- BeginProperty ListImage1 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "frmDb.frx":0000
- Key = "db"
- EndProperty
- EndProperty
- End
- End
- Begin VB.OptionButton Option2
- Caption = "数据恢复"
- Height = 255
- Left = 8760
- TabIndex = 2
- Top = 120
- Width = 1095
- End
- Begin VB.OptionButton Option1
- Caption = "数据备份"
- Height = 255
- Left = 5160
- TabIndex = 1
- Top = 120
- Width = 1095
- End
- Begin MSComctlLib.StatusBar sbStatusBar
- Align = 2 'Align Bottom
- Height = 270
- Left = 0
- TabIndex = 12
- Top = 6435
- Width = 10110
- _ExtentX = 17833
- _ExtentY = 476
- SimpleText = "7"
- _Version = 393216
- BeginProperty Panels {8E3867A5-8586-11D1-B16A-00C0F0283628}
- NumPanels = 3
- BeginProperty Panel1 {8E3867AB-8586-11D1-B16A-00C0F0283628}
- AutoSize = 1
- Object.Width = 11853
- Text = "Access2003数据库备份与恢复 "
- TextSave = "Access2003数据库备份与恢复 "
- EndProperty
- BeginProperty Panel2 {8E3867AB-8586-11D1-B16A-00C0F0283628}
- Style = 6
- AutoSize = 2
- TextSave = "2007-6-7"
- EndProperty
- BeginProperty Panel3 {8E3867AB-8586-11D1-B16A-00C0F0283628}
- Style = 5
- AutoSize = 2
- Object.Width = 2858
- TextSave = "☆崔兆阳☆ 13:52"
- EndProperty
- EndProperty
- End
- Begin VB.Label Label1
- Height = 255
- Left = 240
- TabIndex = 9
- Top = 5280
- Width = 9615
- End
- Begin VB.Label Label
- Caption = "请选择数据备份或回复选项:"
- Height = 255
- Left = 120
- TabIndex = 0
- Top = 120
- Width = 2535
- End
- End
- Attribute VB_Name = "frmDb"
- Attribute VB_GlobalNameSpace = False
- Attribute VB_Creatable = False
- Attribute VB_PredeclaredId = True
- Attribute VB_Exposed = False
- Dim itmX, key As String
- Dim a As Integer
- Private Sub Command2_Click()
- Unload Me
- End Sub
- Private Sub Form_Load()
- Option1.Value = True
- Dir1_Change
- End Sub
- Private Sub Dir1_Change()
- File1.Path = Dir1.Path
- ListView1.ListItems.Clear
- If File1.ListCount <> 0 Then
- a = 0
- Do While File1.ListIndex < File1.ListCount - 1
- File1.ListIndex = a
- key = File1.filename
- Set itmX = ListView1.ListItems.add(, , key, 1)
- a = a + 1
- Loop
- End If
- Label1.Caption = Dir1.Path & "" & File1.filename
- End Sub
- Private Sub Drive1_Change()
- Dir1.Path = Drive1.Drive
- End Sub
- Private Sub File1_Click()
- Label1.Caption = Dir1.Path & "" & File1.filename
- End Sub
- Private Sub Command1_Click()
- If Option1.Value = True Then
- If File1.ListCount <> 0 Then
- FileCopy Trim(Label1.Caption), Date & "备份卡" & File1.filename
- Me.MousePointer = 0
- MsgBox "数据已经备份完毕!"
- key = Date & "备份卡" & File1.filename
- Set itmX = ListView1.ListItems.add(, , key, 1)
- End If
- End If
- If Option2.Value = True Then
- If File1.ListCount <> 0 Then
- FileCopy ListView1.SelectedItem, File1.filename
- Me.MousePointer = 0
- MsgBox "数据已恢复完毕!"
- Else
- MsgBox "请选择要恢复的数据!"
- End If
- End If
- End Sub