main.vb
来自「强大的教务考勤系统数据库」· VB 代码 · 共 27 行
VB
27 行
Module Main
Public constr As String = "uid=sa;pwd=;database=systemdb;server="
Public mycon As New System.Data.SqlClient.SqlConnection(constr)
Public operid, opername, operiden, passwd As String
Sub main()
Try
mycon.Open()
Catch ex As Exception
MsgBox("数据库连接失败!" & ex.ToString, , "")
Exit Sub
End Try
Dim ps As New PasswdWin
ps.StartPosition = FormStartPosition.CenterScreen
ps.ShowDialog()
If (ps.getStat = True) Then
Application.Run(New MainWin)
mycon.Close()
End If
End Sub
Public Function ISValidUid(ByVal Uid As String) As Boolean
Return Regex.IsMatch(Uid, "^[0-9]+$")
End Function
End Module
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?