📄 mdlstartup.bas
字号:
Attribute VB_Name = "mdlStartUp"
Option Explicit
Public Sub Main()
On Error GoTo ErrMs
Screen.MousePointer = vbArrowHourglass
Call SetCurrPath
Call GetDatabaseParameter
Call SetReportHeader
g_blnIsNew = True
'Open Connection
If ConnectDatabase(GCon) = False Then
'弹出设置数据库服务器地址对话框,请客户设置数据库服务器地址
If MsgBox("无法连接数据库,需要手动设置连接参数吗?", _
vbQuestion + vbYesNo + vbDefaultButton1, "询问") = vbYes Then
If dlgServer.Connection = True Then
Unload dlgServer
Set dlgServer = Nothing
'重新获取连接参数
GetDatabaseParameter 'Get Database Parameter
'用全局变量去建立连接
ConnectDatabase GCon
Else
'否则直接退出
Unload dlgServer
Set dlgServer = Nothing
End
End If
Else
'直接退出
End
End If
End If
'启动登录窗口
frmLogin_Set.Show
GoTo ExitLab
ErrMs:
MsgBoxW Err, vbExclamation
EndApp:
End
ExitLab:
Screen.MousePointer = vbDefault
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -