main.vb
来自「本系统利用vb.net做为前台开发工具」· VB 代码 · 共 36 行
VB
36 行
Public Class Main
Public Shared Sub Main()
'是否启用数据库连接助手,版权:http://www.trfsoft.com
Dim IsUseConnSupporter As Boolean = True
If IsUseConnSupporter Then
Dim strErrMsg As String
Dim techSupporter As New techSupport.techSupport
If Not techSupporter.TestConn(DB.DB.ConnStr, strErrMsg, Application.ProductName) Then
MsgBox(strErrMsg, MsgBoxStyle.Exclamation + MsgBoxStyle.ApplicationModal + MsgBoxStyle.SystemModal + MsgBoxStyle.MsgBoxSetForeground)
Application.Exit()
End
End If
End If
'===========================================================
'连接成功,进行正常的登录验证
'=======================================
'首先显示登录窗体以验证用户身份
Dim myfrm As New frmLogin
myfrm.txtPwd.Focus()
myfrm.TopMost = True
myfrm.ShowDialog()
'如果成功登录则记录下用户权限并运行主窗体
If myfrm.blnLoginSucc = True Then
' strLogRole = myfrm.strLoginRole
Dim myfrmMain As New frmMain
myfrmMain.strLogRole = myfrm.strLoginRole
Application.Run(myfrmMain)
End If
End Sub
End Class
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?