?? 登錄.frm
字號:
VERSION 5.00
Begin VB.Form Form2
Caption = "錄登"
ClientHeight = 3540
ClientLeft = 60
ClientTop = 345
ClientWidth = 4680
LinkTopic = "Form2"
ScaleHeight = 3540
ScaleWidth = 4680
StartUpPosition = 3 '窗口缺省
Begin VB.TextBox Text2
Height = 615
Left = 1920
TabIndex = 5
Top = 1560
Width = 1455
End
Begin VB.CommandButton Command2
Caption = "返回"
Height = 495
Left = 2520
TabIndex = 4
Top = 2640
Width = 1095
End
Begin VB.CommandButton Command1
Caption = "確定"
Height = 495
Left = 1200
TabIndex = 3
Top = 2640
Width = 975
End
Begin VB.TextBox Text1
Height = 615
Left = 1920
TabIndex = 2
Top = 600
Width = 1455
End
Begin VB.Label Label2
Caption = " 密 碼:"
Height = 375
Left = 720
TabIndex = 1
Top = 1680
Width = 1095
End
Begin VB.Label Label1
Caption = "用戶名:"
Height = 375
Left = 960
TabIndex = 0
Top = 720
Width = 855
End
End
Attribute VB_Name = "Form2"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim i As Integer
Private Sub Command1_Click()
If Trim(Text1.Text = "") Then
MsgBox "請輸入用戶名", vbexclaimation, "有情提醒"
Text1.SetFocus
Else
On Error GoTo ErrorHandle
mycon.ConnectionString = "Driver={SQL Server};Server=574CF684A29746B;UID=" & Trim(Text1.Text) & ";pwd=" & Trim(Text2.Text) & ";Database=倉庫管理系統(tǒng)1"
mycon.Open
Unload Me
Form3.Show
End If
Exit Sub
ErrorHandle:
i = i + 1
If i <= 2 Then
MsgBox "信息有誤,請重新輸入", vbExclamation, "友情提醒"
Text1.SetFocus
Else
MsgBox "錯誤超過三次,你不能使用本系統(tǒng)!", vbexclaimation, "友情提醒"
End
End If
End Sub
Private Sub Command2_Click()
Form1.Show
Unload Me
End Sub
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -