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

📄 main_xtgl_sjbfhf.frm

📁 商品进销存管理系统 采用VB和SQL2000开发 具有很强的实用性
💻 FRM
字号:
VERSION 5.00
Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCTL.OCX"
Begin VB.Form main_xtgl_sjbfhf 
   BorderStyle     =   3  'Fixed Dialog
   Caption         =   "系统维护-【数据备份】"
   ClientHeight    =   4950
   ClientLeft      =   45
   ClientTop       =   330
   ClientWidth     =   7995
   Icon            =   "main_xtgl_sjbfhf.frx":0000
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   4950
   ScaleWidth      =   7995
   ShowInTaskbar   =   0   'False
   StartUpPosition =   1  '所有者中心
   Begin VB.OptionButton Option2 
      Caption         =   "数据恢复"
      Height          =   270
      Left            =   5730
      TabIndex        =   10
      Top             =   90
      Width           =   1935
   End
   Begin VB.OptionButton Option1 
      Caption         =   "数据备份"
      Height          =   270
      Left            =   4065
      TabIndex        =   9
      Top             =   90
      Value           =   -1  'True
      Width           =   1935
   End
   Begin VB.Frame Frame2 
      Caption         =   "请选择数据库文件"
      Height          =   3540
      Left            =   4020
      TabIndex        =   4
      Top             =   465
      Width           =   3915
      Begin VB.DriveListBox Drive1 
         Height          =   300
         Left            =   150
         TabIndex        =   7
         Top             =   255
         Width           =   3615
      End
      Begin VB.DirListBox Dir1 
         Height          =   720
         Left            =   150
         TabIndex        =   6
         Top             =   630
         Width           =   3615
      End
      Begin VB.FileListBox File1 
         DragIcon        =   "main_xtgl_sjbfhf.frx":000C
         Height          =   2070
         Left            =   150
         Pattern         =   "*.BAK;*.mdb"
         TabIndex        =   5
         Top             =   1380
         Width           =   3615
      End
   End
   Begin VB.Frame Frame1 
      Caption         =   "备份卡列表"
      Height          =   3540
      Left            =   45
      TabIndex        =   2
      Top             =   465
      Width           =   3915
      Begin MSComctlLib.ListView ListView1 
         Height          =   3180
         Left            =   105
         TabIndex        =   3
         Top             =   240
         Width           =   3690
         _ExtentX        =   6509
         _ExtentY        =   5609
         Sorted          =   -1  'True
         LabelWrap       =   -1  'True
         HideSelection   =   -1  'True
         AllowReorder    =   -1  'True
         _Version        =   393217
         Icons           =   "ImageList1"
         SmallIcons      =   "ImageList1"
         ForeColor       =   -2147483640
         BackColor       =   -2147483643
         BorderStyle     =   1
         Appearance      =   1
         NumItems        =   0
      End
   End
   Begin VB.CommandButton Command2 
      Caption         =   "&E 退出"
      Height          =   420
      Left            =   3975
      TabIndex        =   1
      Top             =   4470
      Width           =   2175
   End
   Begin VB.CommandButton Command1 
      Caption         =   "数据备份或数据恢复"
      Height          =   420
      Left            =   1800
      TabIndex        =   0
      Top             =   4470
      Width           =   2175
   End
   Begin MSComctlLib.ImageList ImageList1 
      Left            =   -135
      Top             =   1155
      _ExtentX        =   1005
      _ExtentY        =   1005
      BackColor       =   -2147483643
      ImageWidth      =   32
      ImageHeight     =   32
      MaskColor       =   12632256
      _Version        =   393216
      BeginProperty Images {2C247F25-8591-11D1-B16A-00C0F0283628} 
         NumListImages   =   4
         BeginProperty ListImage1 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "main_xtgl_sjbfhf.frx":044E
            Key             =   ""
         EndProperty
         BeginProperty ListImage2 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "main_xtgl_sjbfhf.frx":0D2A
            Key             =   ""
         EndProperty
         BeginProperty ListImage3 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "main_xtgl_sjbfhf.frx":1606
            Key             =   ""
         EndProperty
         BeginProperty ListImage4 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "main_xtgl_sjbfhf.frx":1EE2
            Key             =   ""
         EndProperty
      EndProperty
   End
   Begin VB.Label Label2 
      BackStyle       =   0  'Transparent
      Caption         =   "※ 请选择数据备份或数据恢复"
      ForeColor       =   &H000000FF&
      Height          =   210
      Left            =   135
      TabIndex        =   11
      Top             =   105
      Width           =   3030
   End
   Begin VB.Label Label1 
      BackStyle       =   0  'Transparent
      ForeColor       =   &H00FF0000&
      Height          =   420
      Left            =   75
      TabIndex        =   8
      Top             =   4050
      Width           =   7890
   End
End
Attribute VB_Name = "main_xtgl_sjbfhf"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
'*************************************************************************
'**模 块 名:main_xtgl_sjbfhf
'**版权说明:吉林省明日科技有限公司享有本软件的所有版权,如果本软件用于商
'**          业用途,必须经过吉林省明日科技有限公司授权。如果提供网上免费
'**          下载,必须经过吉林省明日科技有限公司授权,并保证程序的完整,
'**          不得修改代码、注释和相关内容,否则,我公司将追究其法律责任
'**网    址:www.mingrisoft.com  价值无限,服务无限
'**电    话:(0431)84978981,84978982
'**创 建 人:明日科技
'**日    期:2007-10-31
'**修 改 人:MRLBB
'**日    期:2007-10-31
'**描    述:
'*************************************************************************
Dim itmX, key As String     '声明字符串变量
Dim a As Integer     '声明整型变量
Dim Mydatabase
Private Sub Form_Load()
 Drive1.Drive = App.Path
  '添加数据备份卡到列表中
 ListView1.ListItems.Clear
 If File1.ListCount <> 0 Then
  a = 0
  Do While File1.ListIndex < File1.ListCount - 1
    File1.ListIndex = a
    key = File1.FileName
    If Right(key, 3) <> "mdb" Then
    Set itmX = ListView1.ListItems.Add(, , key, 1)
    End If
    a = a + 1
  Loop
 End If
 
End Sub
Private Sub Form_Unload(Cancel As Integer)
 frm_main.Enabled = True
End Sub
Private Sub Dir1_Change()
 File1.Path = Dir1.Path
 Form_Load  '调用Form_Load过程
 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
     If Right(File1.FileName, 3) <> "mdb" Then
        MsgBox "数据库格式不正确,系统无法进行备份!"
        Exit Sub
     End If
     Mydatabase = Date & "备份卡" & Left$(File1.FileName, Len(File1.FileName) - 3) & "BAK"
     If Dir(Mydatabase) <> "" Then
        MsgBox "今天的备份已完成!"
       Else
        FileCopy Trim(Label1.Caption), Mydatabase
        key = Date & "备份卡" & Left$(File1.FileName, Len(File1.FileName) - 3) & "BAK"
        Set itmX = ListView1.ListItems.Add(, , key, 1)
        MsgBox "数据备份成功!"
     End If
    End If
 End If
 If Option2.Value = True Then
    '恢复数据库
    If File1.ListCount <> 0 Then
     FileCopy ListView1.SelectedItem, App.Path & "\db_medicine.mdb"
     Me.MousePointer = 0
     MsgBox "数据已恢复完毕!"
    Else
     MsgBox "请选择要恢复的数据!"
    End If
 End If
End Sub
Private Sub Command2_Click()
  Load frm_main
  frm_main.Show
  Unload Me
End Sub



⌨️ 快捷键说明

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