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

📄 datarestore.frm

📁 适合乡镇供电所使用电费处理系统v3 软件
💻 FRM
字号:
VERSION 5.00
Object = "{82351433-9094-11D1-A24B-00A0C932C7DF}#1.5#0"; "ANIGIF.OCX"
Begin VB.Form DataRestore 
   BorderStyle     =   3  'Fixed Dialog
   Caption         =   "数据恢复"
   ClientHeight    =   3555
   ClientLeft      =   2805
   ClientTop       =   2340
   ClientWidth     =   6600
   Icon            =   "DataRestore.frx":0000
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   3555
   ScaleWidth      =   6600
   ShowInTaskbar   =   0   'False
   Begin VB.CommandButton Command2 
      Cancel          =   -1  'True
      Caption         =   "退出(&E)"
      Height          =   375
      Left            =   5370
      TabIndex        =   3
      Top             =   3030
      Width           =   1095
   End
   Begin VB.CommandButton Command1 
      Caption         =   "确定(&O)"
      Height          =   375
      Left            =   3915
      TabIndex        =   2
      Top             =   3045
      Width           =   1095
   End
   Begin VB.Frame Frame1 
      Height          =   2745
      Left            =   120
      TabIndex        =   1
      Top             =   120
      Width           =   6375
      Begin VB.FileListBox File1 
         Height          =   2250
         Left            =   3750
         Pattern         =   "*.mdb"
         TabIndex        =   6
         Top             =   300
         Width           =   2340
      End
      Begin VB.DirListBox Dir1 
         Height          =   1770
         Left            =   375
         TabIndex        =   5
         Top             =   750
         Width           =   2700
      End
      Begin VB.DriveListBox Drive1 
         Height          =   300
         Left            =   375
         TabIndex        =   4
         Top             =   300
         Width           =   2745
      End
   End
   Begin AniGIFCtrl.AniGIF AniGIF1 
      Height          =   975
      Left            =   240
      TabIndex        =   0
      Top             =   3960
      Width           =   1335
      BackColor       =   12632256
      PLaying         =   -1  'True
      Transparent     =   -1  'True
      Speed           =   1
      Stretch         =   0
      AutoSize        =   0   'False
      SequenceString  =   ""
      Sequence        =   0
      HTTPProxy       =   ""
      HTTPUserName    =   ""
      HTTPPassword    =   ""
      MousePointer    =   0
      ExtendWidth     =   2355
      ExtendHeight    =   1720
   End
End
Attribute VB_Name = "DataRestore"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit

Private Sub Form_Load()
    On Error Resume Next
    Me.Move (Screen.Width - Me.Width) / 2, (Screen.Height - Me.Height) / 2
    Command1.Enabled = False
    MdbR.Close
    NdMd.Close
End Sub

Private Sub Command1_Click()
    Dim DirString As String
    Dim result As Long, fileop As SHFILEOPSTRUCT
    On Error Resume Next
    DirString = IIf(Right(File1.Path, 1) = "\", Trim(File1.Path) & Trim(File1.FileName), Trim(File1.Path) & "\" & Trim(File1.FileName))
    With fileop
            .hwnd = Me.hwnd
            .wFunc = FO_COPY
            .pFrom = Trim(DirString) & vbNullChar & vbNullChar
            .pTo = App.Path & "\Data" & vbNullChar & vbNullChar
            .fFlags = FOF_SIMPLEPROGRESS Or FOF_FILESONLY
    End With
    If MsgBox("确定要进行此项操作吗吗?(Y/N)", vbYesNo + 32) = vbYes Then
       Kill App.Path & "\Data\Eletricity.Mdb"
       Screen.MousePointer = 11
    Else
       Exit Sub
    End If
    result = SHFileOperation(fileop)
    If result <> 0 Then
            'MsgBox Err.LastDllError
    Else
            If fileop.fAnyOperationsAborted <> 0 Then
                          MsgBox "备份文件失败!"
            Else
               If result <> 0 Then
                  MsgBox "数据恢复不成功,请重新选择文件!", vbCritical
                  Exit Sub
               Else
                  MsgBox "文件恢复成功!", vbInformation
                  Screen.MousePointer = 0
                  Exit Sub
               End If
            End If
    End If
End Sub

Private Sub Command2_Click()
  Unload Me
End Sub

Private Sub Dir1_Change()
  File1.Path = Dir1.Path
End Sub

Private Sub Drive1_Change()
     Dir1.Path = Drive1.Drive
End Sub

Private Sub File1_Click()
   Command1.Enabled = True
End Sub


⌨️ 快捷键说明

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