?? frmlogin.frm
字號:
VERSION 5.00
Begin VB.Form frmLogin
BorderStyle = 3 'Fixed Dialog
Caption = "登錄"
ClientHeight = 5190
ClientLeft = 30
ClientTop = 330
ClientWidth = 6555
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
MousePointer = 4 'Icon
Picture = "frmLogin.frx":0000
ScaleHeight = 5190
ScaleWidth = 6555
ShowInTaskbar = 0 'False
StartUpPosition = 2 '屏幕中心
Tag = "Login"
Begin VB.CommandButton cmdCancel
Cancel = -1 'True
Caption = "Cancel"
Height = 360
Left = 4080
TabIndex = 4
Tag = "Cancel"
Top = 3480
Width = 1140
End
Begin VB.CommandButton cmdOK
Caption = "OK"
Default = -1 'True
Height = 360
Left = 1560
TabIndex = 3
Tag = "OK"
Top = 3480
Width = 1260
End
Begin VB.TextBox txtPassword
Height = 405
IMEMode = 3 'DISABLE
Left = 2640
PasswordChar = "*"
TabIndex = 2
Top = 2400
Width = 2295
End
Begin VB.TextBox txtUserName
Height = 405
IMEMode = 3 'DISABLE
Left = 2640
TabIndex = 1
Top = 1920
Width = 2295
End
Begin VB.Label Label1
BackColor = &H8000000A&
BackStyle = 0 'Transparent
Caption = "連鎖藥店管理系統"
BeginProperty Font
Name = "華文彩云"
Size = 26.25
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H80000007&
Height = 975
Left = 1080
TabIndex = 6
Top = 840
Width = 4455
End
Begin VB.Label lblLabels
BackStyle = 0 'Transparent
Caption = "密 碼:"
BeginProperty Font
Name = "宋體"
Size = 12
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Index = 1
Left = 1320
TabIndex = 0
Tag = "&Password:"
Top = 2520
Width = 1080
End
Begin VB.Label lblLabels
BackStyle = 0 'Transparent
Caption = "用戶名:"
BeginProperty Font
Name = "宋體"
Size = 12
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Index = 0
Left = 1320
TabIndex = 5
Tag = "&User Name:"
Top = 2040
Width = 1080
End
End
Attribute VB_Name = "frmLogin"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Public OK As Boolean
Private Sub cmdCancel_Click()
OK = False
Me.Hide
End Sub
Private Sub cmdOK_Click()
'ToDo: create test for correct password
'check for correct password
Dim txtSQL As String
Dim mrc As ADODB.Recordset
Dim MsgText As String
'ToDo: create test for correct password
'check for correct password
UserName = ""
If Trim(txtUserName.Text = "") Then
MsgBox "沒有這個用戶,請重新輸入用戶名!", vbOKOnly + vbExclamation, "警告"
txtUserName.SetFocus
Else
txtSQL = "select * from user_Info where user_ID = '" & txtUserName.Text & "'"
Set mrc = ExecuteSQL(txtSQL, MsgText)
If mrc.EOF = True Then
MsgBox "沒有這個用戶,請重新輸入用戶名!", vbOKOnly + vbExclamation, "警告"
txtUserName.SetFocus
Else
If Trim(mrc.Fields(1)) = Trim(txtPassword.Text) Then
OK = True
mrc.Close
Me.Hide
UserName = Trim(txtUserName.Text)
Else
MsgBox "輸入密碼不正確,請重新輸入!", vbOKOnly + vbExclamation, "警告"
txtPassword.SetFocus
txtPassword.Text = ""
End If
End If
End If
miCount = miCount + 1
If miCount = 3 Then
Me.Hide
End If
Exit Sub
End Sub
Private Sub Form_Paint()
Me.PaintPicture Me.Picture, 0, 0, Me.ScaleWidth, Me.ScaleHeight
End Sub
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -