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

📄 frmdatainit.frm

📁 婚姻介绍所管理信息系统
💻 FRM
字号:
VERSION 5.00
Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "mscomctl.ocx"
Begin VB.Form FrmDataInit 
   BackColor       =   &H80000013&
   BorderStyle     =   0  'None
   Caption         =   "Form1"
   ClientHeight    =   1440
   ClientLeft      =   5730
   ClientTop       =   4605
   ClientWidth     =   4530
   Icon            =   "FrmDataInit.frx":0000
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   1440
   ScaleWidth      =   4530
   ShowInTaskbar   =   0   'False
   StartUpPosition =   2  '屏幕中心
   Begin VB.Timer Timer1 
      Interval        =   10
      Left            =   4005
      Top             =   225
   End
   Begin MSComctlLib.ProgressBar ProgressBar1 
      Height          =   285
      Left            =   360
      TabIndex        =   0
      Top             =   945
      Width           =   3720
      _ExtentX        =   6562
      _ExtentY        =   503
      _Version        =   393216
      Appearance      =   1
      Scrolling       =   1
   End
   Begin VB.Image Image1 
      Height          =   300
      Left            =   3450
      MouseIcon       =   "FrmDataInit.frx":0442
      MousePointer    =   99  'Custom
      Picture         =   "FrmDataInit.frx":074C
      Top             =   960
      Width           =   675
   End
   Begin VB.Label Label1 
      BackColor       =   &H80000013&
      Caption         =   "正在初始化数据库. . ."
      Height          =   240
      Left            =   405
      TabIndex        =   1
      Top             =   405
      Width           =   3570
   End
End
Attribute VB_Name = "FrmDataInit"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim i As Integer
Dim Conn As ADODB.Connection
Dim Rs As ADODB.Recordset
Dim sqlStr As String
Dim Done As Boolean

Private Sub image1_Click()
    Unload Me
End Sub

Private Sub Form_Load()
    Set Conn = New ADODB.Connection
    Set Rs = New ADODB.Recordset
    Me.MousePointer = 11
    i = 0
    Image1.Visible = False
    Conn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\mgydb.mdb;Persist Security Info=False"
    Conn.Open
    sqlStr = "delete * from mgydb"
    Rs.Open sqlStr, Conn, adOpenDynamic, adLockOptimistic, -1
    Done = True
End Sub

Private Sub Timer1_Timer()
    i = i + 1
    ProgressBar1.Value = i
    If Done = True Then
        ProgressBar1.Value = 100
    End If
    If ProgressBar1.Value = 100 Then
        Timer1.Enabled = False
        Label1.Caption = "初始化完成!数据库中已无任何信息!"
        ProgressBar1.Visible = False
        Image1.Visible = True
        Me.MousePointer = 0
    End If
End Sub

⌨️ 快捷键说明

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