?? form9.frm
字號:
VERSION 5.00
Begin VB.Form Form9
Caption = "Form9"
ClientHeight = 3750
ClientLeft = 60
ClientTop = 450
ClientWidth = 6270
LinkTopic = "Form9"
ScaleHeight = 3750
ScaleWidth = 6270
StartUpPosition = 3 '窗口缺省
Begin VB.CommandButton Command1
Caption = "退出"
Height = 495
Left = 4680
TabIndex = 4
Top = 2760
Width = 1335
End
Begin VB.TextBox txtUsername
Height = 375
Left = 1560
TabIndex = 0
Top = 720
Width = 1695
End
Begin VB.CommandButton cmdCancel
Caption = "取消"
Height = 495
Left = 4680
TabIndex = 3
Top = 1680
Width = 1335
End
Begin VB.TextBox txtPassword
Height = 375
IMEMode = 3 'DISABLE
Left = 1560
PasswordChar = "*"
TabIndex = 1
Top = 1680
Width = 1695
End
Begin VB.CommandButton cmdOK
Caption = "確定"
Height = 495
Left = 4680
TabIndex = 2
Top = 600
Width = 1335
End
Begin VB.Label Label2
Caption = "管理員名(&U):"
Height = 495
Left = 240
TabIndex = 6
Top = 720
Width = 1335
End
Begin VB.Label Label1
Caption = "密碼(M):"
Height = 255
Left = 240
TabIndex = 5
Top = 1800
Width = 855
End
End
Attribute VB_Name = "Form9"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub cmdCancel_Click()
txtUsername.Text = ""
txtPassword.Text = ""
txtUsername.SetFocus
End Sub
Private Sub cmdOK_Click()
Dim i As Integer
Static n As Integer
Dim getpass As String
getpass = Module2.getpasswd(txtUsername.Text)
If getpass <> txtPassword.Text Then
n = n + 1
If n < 3 Then
i = MsgBox("用戶名或密碼錯誤,請重新輸入!", vbCritical + vbRetryCancel + vbDefaultButton1, "登錄失敗")
If i = vbRetry Then
txtUsername.Text = ""
txtPassword.Text = ""
txtUsername.SetFocus
Else
End
End If
Else
MsgBox "三次錯誤,請退出!", vbOKOnly + vbExclamation, "登錄失敗"
End
End If
Else
Form2.Show
Unload Form1
Unload Me
db.Close
Set db = Nothing
End If
End Sub
Private Sub Command1_Click()
Unload Me
Form1.Show
End Sub
Private Sub Form_Load()
db.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=DATA.mdb;Persist Security Info=False"
db.Open
End Sub
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -