?? h_a_welcome.frm
字號:
VERSION 5.00
Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX"
Begin VB.Form a_welcome
AutoRedraw = -1 'True
BorderStyle = 1 'Fixed Single
Caption = "登錄二手書交易系統"
ClientHeight = 5130
ClientLeft = 45
ClientTop = 435
ClientWidth = 7875
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 5130
ScaleWidth = 7875
StartUpPosition = 2 '屏幕中心
Begin MSAdodcLib.Adodc Adodc1
Height = 330
Left = 120
Top = 120
Visible = 0 'False
Width = 1200
_ExtentX = 2117
_ExtentY = 582
ConnectMode = 0
CursorLocation = 3
IsolationLevel = -1
ConnectionTimeout= 15
CommandTimeout = 30
CursorType = 3
LockType = 3
CommandType = 8
CursorOptions = 0
CacheSize = 50
MaxRecords = 0
BOFAction = 0
EOFAction = 0
ConnectStringType= 1
Appearance = 1
BackColor = -2147483643
ForeColor = -2147483640
Orientation = 0
Enabled = -1
Connect = ""
OLEDBString = ""
OLEDBFile = ""
DataSourceName = ""
OtherAttributes = ""
UserName = ""
Password = ""
RecordSource = ""
Caption = "Adodc1"
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋體"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
_Version = 393216
End
Begin VB.CommandButton Command2
Caption = "退 出"
Height = 495
Left = 4800
TabIndex = 10
Top = 4320
Width = 1215
End
Begin VB.CommandButton Command1
Caption = "確 定"
Height = 495
Left = 1920
TabIndex = 9
Top = 4320
Width = 1215
End
Begin VB.Frame Frame1
Caption = "登陸"
BeginProperty Font
Name = "宋體"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 2415
Left = 1080
TabIndex = 2
Top = 1680
Width = 5775
Begin VB.ComboBox Combo1
Height = 300
ItemData = "h_a_welcome.frx":0000
Left = 2160
List = "h_a_welcome.frx":000D
TabIndex = 8
Top = 1440
Width = 1575
End
Begin VB.TextBox Text2
Height = 375
IMEMode = 3 'DISABLE
Left = 2160
PasswordChar = "*"
TabIndex = 7
Top = 960
Width = 2175
End
Begin VB.TextBox Text1
Height = 375
Left = 2160
TabIndex = 6
Top = 480
Width = 2175
End
Begin VB.Label Label5
AutoSize = -1 'True
Caption = "登陸權限"
BeginProperty Font
Name = "宋體"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Left = 720
TabIndex = 5
Top = 1560
Width = 855
End
Begin VB.Label Label4
AutoSize = -1 'True
Caption = "密碼"
BeginProperty Font
Name = "宋體"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Left = 1080
TabIndex = 4
Top = 1080
Width = 495
End
Begin VB.Label Label3
AutoSize = -1 'True
Caption = "帳號"
BeginProperty Font
Name = "宋體"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 210
Left = 1080
TabIndex = 3
Top = 600
Width = 420
End
End
Begin VB.Label Label2
Alignment = 2 'Center
AutoSize = -1 'True
Caption = "上海財經大學二手書交易系統"
BeginProperty Font
Name = "隸書"
Size = 21.75
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 435
Left = 0
TabIndex = 1
Top = 840
Width = 7995
End
Begin VB.Label Label1
Alignment = 2 'Center
AutoSize = -1 'True
Caption = "歡迎使用"
BeginProperty Font
Name = "隸書"
Size = 21.75
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 435
Left = 3090
TabIndex = 0
Top = 360
Width = 1815
End
End
Attribute VB_Name = "a_welcome"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
If Combo1.Text = "user" Then
If Text1 = "" Then
MsgBox "請填寫帳號!", vbOKOnly + vbExclamation, "提示"
Text1.SetFocus: Exit Sub
End If
Adodc1.RecordSource = "select * from hy where id='" & Text1.Text & "'"
Adodc1.Refresh
If Adodc1.Recordset.RecordCount <> 0 Then
If Text2 = "" Then
MsgBox "請輸入密碼!", vbOKOnly + vbExclamation, "提示"
Text2.SetFocus: Exit Sub
End If
If Adodc1.Recordset.Fields("mima") = Text2 Then
yhid = Text1 '傳遞用戶帳號
main.Show
Unload Me
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Else
MsgBox "密碼錯誤!", vbOKOnly + vbExclamation, "提示"
Text2 = ""
Text2.SetFocus
j = j + 1
If j > 3 Then
MsgBox "對不起,重試超過3次!", vbOKOnly + vbExclamation, "提示"
Unload Me
End If
: Exit Sub
End If
Else
MsgBox "帳號不存在,請重新輸入!", vbOKOnly + vbExclamation, "提示"
Text1 = ""
Text2 = ""
Text1.SetFocus: Exit Sub
End If
ElseIf Combo1.Text = "admin" Then
If Text1.Text = "" Then
MsgBox "請輸入帳號!", vbOKOnly + vbExclamation, "提示"
Text1.SetFocus: Exit Sub
End If
If Text2.Text = "" Then
MsgBox "請輸入密碼!", vbOKOnly + vbExclamation, "提示"
Text2.SetFocus: Exit Sub
End If
Adodc1.RecordSource = "select * from gly where id= '" & Text1.Text & "'"
Adodc1.Refresh
If Adodc1.Recordset.RecordCount = 0 Then
MsgBox "查無此帳號,請重新輸入!", vbOKOnly + vbExclamation, "提示"
Text1.Text = ""
Text2.Text = ""
Text1.SetFocus: Exit Sub
End If
If Text2.Text = Adodc1.Recordset.Fields("mima") Then
glyid = Text1
main.Show '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Unload Me
Else
q = MsgBox("密碼不正確,請重新輸入!!", vbOKOnly + vbExclamation, "提示")
If q = vbOK Then
i = i + 1
Text2.Text = ""
Text2.SetFocus
End If
If i >= 3 Then
w = MsgBox("重試超過三次!", vbOKOnly + vbExclamation, "sorry!")
If w = vbOK Then
Unload Me
End If
End If
End If
ElseIf Combo1.Text = "sysadmin" Then
msg = MsgBox("功能開發中,請選擇其他操作", vbOKOnly + vbExclamation, "sorry!")
Text1.Text = ""
Text2.Text = ""
Text1.SetFocus: Exit Sub
Else
End If
End Sub
Private Sub Command2_Click()
Unload Me
End Sub
Private Sub Form_Load()
Adodc1.ConnectionString = cns1 & App.Path & cns2
Adodc1.RecordSource = "select * from hy"
Adodc1.Refresh
yhid = "" '初始化用戶狀態傳遞變量
mm = 0
j = 0 '初始化計數變量
i = 0
End Sub
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -