📄 frmmain.frm
字号:
VERSION 5.00
Object = "{F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.2#0"; "COMDLG32.OCX"
Begin VB.Form frmMain
BorderStyle = 1 'Fixed Single
Caption = "数据库管理助手"
ClientHeight = 3930
ClientLeft = 45
ClientTop = 435
ClientWidth = 6825
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 3930
ScaleWidth = 6825
StartUpPosition = 3 '窗口缺省
Begin VB.Frame fraMain
Caption = "数据库操作"
Height = 3075
Index = 4
Left = 6300
TabIndex = 13
Top = 120
Width = 6495
Begin VB.Label lblAlert
Caption = "正在建立数据库,请稍等..."
Height = 975
Left = 1080
TabIndex = 14
Top = 1140
Width = 4455
End
End
Begin VB.Frame fraMain
Caption = "还原数据库"
Height = 3075
Index = 2
Left = 6360
TabIndex = 19
Top = 180
Width = 6495
Begin VB.TextBox txtRestorePath
Height = 315
Left = 1980
TabIndex = 21
Top = 1140
Width = 3315
End
Begin VB.CommandButton cmdShowDialog
Caption = "..."
Height = 315
Index = 1
Left = 5340
TabIndex = 20
Top = 1140
Width = 435
End
Begin VB.Label Label4
Alignment = 1 'Right Justify
Caption = "备份文件路径:"
Height = 195
Left = 480
TabIndex = 22
Top = 1200
Width = 1455
End
End
Begin VB.Frame fraMain
Caption = "备份数据库"
Height = 3075
Index = 3
Left = 6360
TabIndex = 15
Top = 480
Width = 6495
Begin VB.CommandButton cmdShowDialog
Caption = "..."
Height = 315
Index = 0
Left = 5340
TabIndex = 18
Top = 1140
Width = 435
End
Begin MSComDlg.CommonDialog dlgMain
Left = 5400
Top = 2160
_ExtentX = 847
_ExtentY = 847
_Version = 393216
End
Begin VB.TextBox txtBackupPath
Height = 315
Left = 1980
TabIndex = 16
Top = 1140
Width = 3315
End
Begin VB.Label Label3
Alignment = 1 'Right Justify
Caption = "备份路径:"
Height = 195
Left = 840
TabIndex = 17
Top = 1200
Width = 1095
End
End
Begin VB.Frame fraMain
Caption = "请选择所需要的操作"
Height = 3075
Index = 1
Left = 6420
TabIndex = 8
Top = 180
Width = 6495
Begin VB.OptionButton optBackupDB
Caption = "备份数据库"
Height = 255
Left = 1020
TabIndex = 12
Top = 1020
Width = 3855
End
Begin VB.OptionButton optRestoreDB
Caption = "恢复数据库"
Height = 255
Left = 1020
TabIndex = 11
Top = 1500
Width = 3855
End
Begin VB.OptionButton optReCreateDB
Caption = "重建数据库(当前的数据将不会被保存,请谨慎使用)"
Height = 255
Left = 1020
TabIndex = 10
Top = 2100
Width = 5235
End
Begin VB.OptionButton optCreateDB
Caption = "创建数据库(第一次运行时用)"
Height = 255
Left = 1020
TabIndex = 9
Top = 540
Width = 3855
End
End
Begin VB.CommandButton cmdQuit
Caption = "完成(&F)"
Height = 435
Left = 4800
TabIndex = 7
Top = 3360
Width = 1515
End
Begin VB.CommandButton cmdNext
Caption = "下一步(&N) >>"
Height = 435
Left = 3075
TabIndex = 6
Top = 3360
Width = 1515
End
Begin VB.CommandButton cmdPre
Caption = "<< (&P)上一步"
Height = 435
Left = 1560
TabIndex = 5
Top = 3360
Width = 1515
End
Begin VB.Frame fraMain
Caption = "请输入服务器参数"
Height = 3075
Index = 0
Left = 180
TabIndex = 0
Top = 180
Width = 6495
Begin VB.TextBox txtPassWord
Height = 315
Left = 1920
TabIndex = 2
Top = 1740
Width = 2415
End
Begin VB.TextBox txtAccout
Height = 315
Left = 1920
TabIndex = 1
Text = "sa"
Top = 1200
Width = 2415
End
Begin VB.Label Label5
Caption = " 数据库帐号和密码请使用安装时设定的帐号和密码,如果你不清楚,请不要更改下边的设定,单击下一步继续操作。"
Height = 495
Left = 480
TabIndex = 23
Top = 480
Width = 5175
End
Begin VB.Label Label2
Alignment = 1 'Right Justify
Caption = "帐号:"
Height = 255
Left = 900
TabIndex = 4
Top = 1260
Width = 915
End
Begin VB.Label Label1
Alignment = 1 'Right Justify
Caption = "密码:"
Height = 255
Left = 900
TabIndex = 3
Top = 1800
Width = 915
End
End
End
Attribute VB_Name = "frmMain"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub cmdNext_Click()
' 备份页面
If cmdQuit.Tag = 3 Then
If Trim$(txtBackupPath.Text) <> "" Then
DoEvents
Call ShowFrame(4)
Call BackupDB(Trim$(txtBackupPath.Text))
cmdNext.Enabled = False
Else
MsgBox "必须指定一个文件名。", vbCritical + vbOKOnly, "系统提示"
End If
End If
' 恢复页面
If cmdQuit.Tag = 2 Then
If MsgBox("恢复数据库将不保存目前的数据,请确认一定要恢复数据库吗?", vbQuestion + vbYesNo, "系统提示") = vbYes Then
If Trim$(txtRestorePath.Text) <> "" Then
DoEvents
Call ShowFrame(4)
Call RestoreDB(Trim$(txtRestorePath.Text))
cmdNext.Enabled = False
Else
MsgBox "必须指定一个文件名。", vbCritical + vbOKOnly, "系统提示"
End If
End If
End If
'第一个页面时执行
If cmdQuit.Tag = 0 Then
Call ShowFrame(1)
If optCreateDB.Value = False And optBackupDB.Value = False And optRestoreDB.Value = False And optReCreateDB.Value = False Then
cmdNext.Enabled = False
Else
cmdNext.Enabled = True
End If
End If
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -