?? loginform.frm
字號:
VERSION 5.00
Begin VB.Form LoginForm
Caption = "用戶登錄框"
ClientHeight = 2490
ClientLeft = 60
ClientTop = 420
ClientWidth = 4680
LinkTopic = "Form1"
MaxButton = 0 'False
ScaleHeight = 2490
ScaleWidth = 4680
StartUpPosition = 3 '窗口缺省
Begin VB.Frame loginDlg
Caption = "用戶登錄框"
Height = 2055
Left = 240
TabIndex = 0
Top = 240
Width = 4215
Begin VB.CommandButton LoginCancel
Caption = "Cancel"
Height = 375
Left = 3000
TabIndex = 6
Top = 1560
Width = 975
End
Begin VB.CommandButton LoginOk
Caption = "OK"
Height = 375
Left = 1680
TabIndex = 5
Top = 1560
Width = 975
End
Begin VB.TextBox txtLoginPwd
Height = 270
IMEMode = 3 'DISABLE
Left = 1200
PasswordChar = "*"
TabIndex = 4
Top = 840
Width = 2775
End
Begin VB.TextBox txtLoginName
Height = 270
Left = 1200
TabIndex = 3
Top = 360
Width = 2775
End
Begin VB.Label Label2
Caption = "密碼:"
Height = 255
Left = 480
TabIndex = 2
Top = 840
Width = 855
End
Begin VB.Label Label1
Caption = "用戶名:"
Height = 255
Index = 0
Left = 480
TabIndex = 1
Top = 360
Width = 855
End
End
End
Attribute VB_Name = "LoginForm"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub LoginCancel_Click()
Unload Me
End Sub
Private Sub LoginOk_Click()
'Dim mrc As ADODB.Recordset
strSql = "select * from user_info where user_info_name = '" & Trim(LoginForm.txtLoginName) & "' and user_info_pwd='" & Trim(LoginForm.txtLoginPwd) & "'"
Set rs = ExecuteSQL(strSql)
If rs.EOF = True Then
MsgBox "登錄失敗,用戶名或密碼錯誤!", vbExclamation + vbOKOnly, "警告"
rs.Close
Else
username = Trim(LoginForm.txtLoginName)
userpwd = Trim(LoginForm.txtLoginPwd)
MDIMainForm.Show
Unload Me
End If
End Sub
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -