?? frm_login.frm
字號:
VERSION 5.00
Begin VB.Form Frm_Login
Appearance = 0 'Flat
BackColor = &H00F0BB79&
Caption = " 登 錄 系 統"
ClientHeight = 3855
ClientLeft = 60
ClientTop = 450
ClientWidth = 7305
Icon = "Frm_Login.frx":0000
LinkTopic = "Form1"
MaxButton = 0 'False
ScaleHeight = 3855
ScaleWidth = 7305
StartUpPosition = 2 '屏幕中心
Begin VB.CommandButton Cmd_L_Exit
Caption = "退 出"
BeginProperty Font
Name = "宋體"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 4080
TabIndex = 3
Top = 3120
Width = 1335
End
Begin VB.CommandButton Cmd_L_Enter
Caption = "登 錄"
Default = -1 'True
BeginProperty Font
Name = "宋體"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 1680
TabIndex = 2
Top = 3120
Width = 1455
End
Begin VB.Frame Frm_Login
Appearance = 0 'Flat
BackColor = &H00F0BB79&
BorderStyle = 0 'None
ForeColor = &H80000008&
Height = 1335
Left = 600
TabIndex = 4
Top = 1680
Width = 5775
Begin VB.TextBox Txt_L_PassW
BeginProperty Font
Name = "宋體"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
IMEMode = 3 'DISABLE
Left = 2280
PasswordChar = "*"
TabIndex = 1
Top = 720
Width = 2895
End
Begin VB.ComboBox Cob_L_UserN
Appearance = 0 'Flat
BeginProperty Font
Name = "宋體"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 360
Left = 2280
TabIndex = 0
Top = 120
Width = 2895
End
Begin VB.Label Label1
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "密 碼:"
BeginProperty Font
Name = "宋體"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 210
Index = 1
Left = 960
TabIndex = 6
Top = 840
Width = 1260
End
Begin VB.Label Label
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "管理員帳號:"
BeginProperty Font
Name = "宋體"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 210
Index = 0
Left = 960
TabIndex = 5
Top = 240
Width = 1260
End
End
Begin VB.Label Label2
Alignment = 2 'Center
Appearance = 0 'Flat
AutoSize = -1 'True
BackColor = &H80000005&
BackStyle = 0 'Transparent
Caption = "用 戶 登 錄"
BeginProperty Font
Name = "宋體"
Size = 15
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00FF0000&
Height = 300
Left = 2520
TabIndex = 7
Top = 480
Width = 1785
End
Begin VB.Line Line2
BorderColor = &H80000009&
X1 = 0
X2 = 7320
Y1 = 1440
Y2 = 1440
End
Begin VB.Line Line1
BorderColor = &H8000000C&
BorderWidth = 2
X1 = 0
X2 = 7320
Y1 = 1440
Y2 = 1440
End
Begin VB.Image Image1
Appearance = 0 'Flat
Height = 1455
Left = -120
Picture = "Frm_Login.frx":038A
Stretch = -1 'True
Top = 0
Width = 7455
End
End
Attribute VB_Name = "Frm_Login"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Cmd_L_Enter_Click()
Dim s_NM As String
Open_Data ("select * from ST_UserInfo where UserName='" & Cob_L_UserN.Text & "'")
If rs.RecordCount = 0 Then
MsgBox "無效的用戶名,請重試!", , "登錄"
Cob_L_UserN.SetFocus
Cob_L_UserN.SelStart = 0
Cob_L_UserN.SelLength = Len(Cob_L_UserN.Text)
Exit Sub
Else
Open_Data ("select * from ST_UserInfo where UserName='" & Cob_L_UserN.Text & "' and UserPass ='" & Txt_L_PassW.Text & "'")
If rs.RecordCount = 0 Then
MsgBox "無效的密碼,請重試!", , "登錄"
Txt_L_PassW.SetFocus
Txt_L_PassW.SelStart = 0
Txt_L_PassW.SelLength = Len(Txt_L_PassW.Text)
Exit Sub
Else
Frm_Main.Show
Unload Me
End If
End If
Frm_Main.Show
Unload Me
End Sub
Private Sub Cmd_L_Exit_Click()
Unload Me
End Sub
Private Sub Form_Load()
On Error GoTo Err:
Open_Data ("select * from ST_UserInfo")
If rs.RecordCount <> 0 Then rs.MoveFirst
While Not rs.EOF
Cob_L_UserN.AddItem rs!UserName
rs.MoveNext
Wend
Cob_L_UserN.Text = Cob_L_UserN.List(0)
Err:
End Sub
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -