?? form1_1.frm
字號(hào):
VERSION 5.00
Begin VB.Form FormLOGIN
BorderStyle = 1 'Fixed Single
Caption = "登 錄"
ClientHeight = 2220
ClientLeft = 5595
ClientTop = 3540
ClientWidth = 3990
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 2220
ScaleWidth = 3990
Begin VB.CommandButton Command2
Caption = "取 消"
Height = 495
Left = 2400
TabIndex = 5
Top = 1440
Width = 975
End
Begin VB.CommandButton Command1
Caption = "確 定"
Default = -1 'True
Height = 495
Left = 600
TabIndex = 4
Top = 1440
Width = 975
End
Begin VB.TextBox Text2
Height = 375
IMEMode = 3 'DISABLE
Left = 1440
PasswordChar = "*"
TabIndex = 3
Top = 840
Width = 1935
End
Begin VB.TextBox Text1
Height = 375
Left = 1440
TabIndex = 1
Top = 480
Width = 1335
End
Begin VB.Label Label1
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "密 碼:"
Height = 180
Index = 1
Left = 600
TabIndex = 2
Top = 960
Width = 720
End
Begin VB.Label Label1
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "員工號(hào):"
Height = 180
Index = 0
Left = 600
TabIndex = 0
Top = 600
Width = 720
End
End
Attribute VB_Name = "FormLOGIN"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Public LoginSucceeded As Boolean
Private Sub command2_Click()
'設(shè)置全局變量為 false
'不提示失敗的登錄
LoginSucceeded = False
Me.Hide
End Sub
Private Sub command1_Click()
Set R = New ADODB.Recordset
Set C = New ADODB.Command
Set R2 = New ADODB.Recordset
Set C2 = New ADODB.Command
mm = Trim(Text1.Text)
YID (Trim(Text1.Text))
If Text2.Text = nn Then
msk1 = 2
C.ActiveConnection = J
C.CommandType = adCmdText
C.CommandText = "select Q from dbo.M where Y# = '" & mm & "';"
R.CursorLocation = adUseClient
R.Open C, , adOpenDynamic, adLockReadOnly
If Not R.EOF Then
msk = R!Q
Else
msk = 0
MsgBox "您還未得到任何權(quán)限!請(qǐng)與系統(tǒng)管理員聯(lián)系", vbCritical, "警告"
End If
MDIForm1.MDIForm_Load
Unload Me
Else
MsgBox "密碼錯(cuò)誤!", , "警告"
Text2.SetFocus
SendKeys "{Home}+{End}"
End If
C.Cancel
Set R = Nothing
Set C = Nothing
H = Hour(Time)
M = Minute(Time)
S = Second(Time)
T = H & ":" & M & ":" & S
D = Day(Date)
Y = Year(Date)
M1 = Month(Date)
U = Y & "/" & M1 & "/" & D & "----" & T
Dim sssss As String
sssss = "insert into jx654.RZ values('" & mm & "','登錄','" & U & "');"
' J.Execute sssss
End Sub
Public Sub YID(S As String)
Dim pwd As String
C2.ActiveConnection = x
C2.CommandType = adCmdText
C2.CommandText = "select M from dbo.M where Y# ='" & S & "';"
R2.CursorLocation = adUseClient
R2.Open C2, , adOpenDynamic, adLockReadOnly
If Not R2.EOF Then
nn = R2!M
Else
MsgBox "該用戶不存在!", , "警告"
Text1.SetFocus
SendKeys "{Home}+{End}"
End If
R2.Close
C2.Cancel
Set R2 = Nothing
Set C2 = Nothing
End Sub
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -