?? forlogin.frm
字號:
VERSION 5.00
Begin VB.Form ForLogin
Caption = "登陸框"
ClientHeight = 5265
ClientLeft = 60
ClientTop = 435
ClientWidth = 7320
LinkTopic = "Form1"
ScaleHeight = 5265
ScaleWidth = 7320
StartUpPosition = 2 'CenterScreen
Begin VB.PictureBox Picture5
BorderStyle = 0 'None
Height = 495
Left = 5880
Picture = "ForLogin.frx":0000
ScaleHeight = 495
ScaleWidth = 495
TabIndex = 13
Top = 4440
Width = 495
End
Begin VB.PictureBox Picture4
BackColor = &H00FFFFFF&
BorderStyle = 0 'None
Height = 495
Left = 840
Picture = "ForLogin.frx":08CA
ScaleHeight = 495
ScaleWidth = 495
TabIndex = 12
Top = 4440
Width = 495
End
Begin VB.CommandButton Command2
BackColor = &H00FFC0FF&
Caption = "取消"
BeginProperty Font
Name = "MS Sans Serif"
Size = 12
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Left = 3960
Style = 1 'Graphical
TabIndex = 9
Top = 4440
Width = 1695
End
Begin VB.CommandButton Command1
BackColor = &H00FFC0FF&
Caption = "確定"
BeginProperty Font
Name = "MS Sans Serif"
Size = 12
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Left = 1440
Style = 1 'Graphical
TabIndex = 8
Top = 4440
Width = 1695
End
Begin VB.Frame Frame1
BackColor = &H00FFC0FF&
Caption = "登陸系統"
BeginProperty Font
Name = "MS Sans Serif"
Size = 12
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 2655
Left = 840
TabIndex = 1
Top = 1440
Width = 5535
Begin VB.PictureBox Picture3
BackColor = &H00FFC0FF&
BorderStyle = 0 'None
Height = 615
Left = 480
Picture = "ForLogin.frx":1194
ScaleHeight = 615
ScaleWidth = 615
TabIndex = 11
Top = 1920
Width = 615
End
Begin VB.PictureBox Picture2
BackColor = &H00FFC0FF&
BorderStyle = 0 'None
Height = 735
Left = 480
Picture = "ForLogin.frx":1A5E
ScaleHeight = 735
ScaleWidth = 735
TabIndex = 10
Top = 1080
Width = 735
End
Begin VB.TextBox txtPassword
BackColor = &H00C0FFFF&
Height = 375
IMEMode = 3 'DISABLE
Left = 2520
PasswordChar = "*"
TabIndex = 7
Text = "Text2"
Top = 1920
Width = 1455
End
Begin VB.TextBox txtUserName
BackColor = &H00C0FFFF&
Height = 375
Left = 2520
TabIndex = 6
Text = "Text1"
Top = 1320
Width = 1455
End
Begin VB.OptionButton Option2
BackColor = &H00FFC0FF&
Caption = "前臺售票員"
BeginProperty Font
Name = "MS Sans Serif"
Size = 12
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 735
Left = 3240
TabIndex = 3
Top = 360
Width = 2055
End
Begin VB.OptionButton Option1
BackColor = &H00FFC0FF&
Caption = "后臺管理人"
BeginProperty Font
Name = "MS Sans Serif"
Size = 12
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 615
Left = 720
TabIndex = 2
Top = 480
Width = 2055
End
Begin VB.Label Label3
BackColor = &H00FFC0FF&
Caption = "密 碼"
BeginProperty Font
Name = "MS Sans Serif"
Size = 12
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 1440
TabIndex = 5
Top = 1920
Width = 735
End
Begin VB.Label Label2
BackColor = &H00FFC0FF&
Caption = "用戶名"
BeginProperty Font
Name = "MS Sans Serif"
Size = 12
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 1440
TabIndex = 4
Top = 1320
Width = 855
End
End
Begin VB.PictureBox Picture1
BackColor = &H0080FFFF&
BorderStyle = 0 'None
FillColor = &H00C0FFFF&
FillStyle = 2 'Horizontal Line
Height = 495
Left = 840
Picture = "ForLogin.frx":2928
ScaleHeight = 495
ScaleWidth = 495
TabIndex = 0
Top = 480
Width = 495
End
Begin VB.Label Label1
BackStyle = 0 'Transparent
Caption = "歡迎進入火車訂購票系統"
BeginProperty Font
Name = "黑體"
Size = 18
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00800080&
Height = 495
Left = 1560
TabIndex = 14
Top = 600
Width = 4455
End
Begin VB.Image Image1
Height = 11520
Left = -7440
Picture = "ForLogin.frx":2C32
Top = -240
Width = 15360
End
End
Attribute VB_Name = "ForLogin"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Public UserType As String
Public UserName As String
Public BookTicketRight As Integer
Public SaleTicketRight As Integer
Public BackTicketRight As Integer
Public TrainUpdateRight As Integer
Public TicketUpdateRight As Integer
Public Count1Right As Integer
Public Count2Right As Integer
Public Count3Right As Integer
Public SetRight As Integer
Public SetSecretRight As Integer
Public BackTicketInfoRight As Integer
Public SeledTicketInfoRight As Integer
Private Sub Command1_Click()
Dim txtSQL As String
Dim mrc As ADODB.Recordset
Dim MsgText As String
If UserType = "" Then
MsgBox "請選擇用戶類型!", vbOKOnly + vbExclamation, "警告"
Exit Sub
End If
If Trim(txtUserName.Text = "") Then
MsgBox "沒有這個用戶,請重新輸入用戶名!", vbOKOnly + vbExclamation, "警告"
txtUserName.SetFocus
Else
txtSQL = "select * from 用戶信息表 where 用戶姓名='" & txtUserName.Text & "'"
Set mrc = ExecuteSQL(txtSQL, MsgText)
If mrc.EOF = True Then
MsgBox "沒有這個用戶,請重新輸入用戶名!", vbOKOnly + vbExclamation, "警告"
txtUserName.SetFocus
Else
If Trim(mrc.Fields(3)) = Trim(txtPassword.Text) And (Trim(mrc.Fields(2)) = UserType) Then
OK = True
UserName = Trim(txtUserName.Text)
BookTicketRight = mrc.Fields(4).Value
SaleTicketRight = mrc.Fields(5).Value
BackTicketRight = mrc.Fields(6).Value
TrainUpdateRight = mrc.Fields(7).Value
TicketUpdateRight = mrc.Fields(8).Value
Count1Right = mrc.Fields(9).Value
Count2Right = mrc.Fields(10).Value
Count3Right = mrc.Fields(11).Value
SetRight = mrc.Fields(12).Value
SetSecretRight = mrc.Fields(13).Value
BackTicketInfoRight = mrc.Fields(14).Value
SeledTicketInfoRight = mrc.Fields(15).Value
mrc.Close
Me.Hide
ForMain.Show
Else
MsgBox "密碼錯誤,請重新輸入!", vbOKOnly + vbExclamation, "警告"
txtPassword.SetFocus
txtPassword.Text = ""
End If
End If
End If
miCount = miCount + 1
If miCount = 3 Then
Me.Hide
End If
Exit Sub
End Sub
Private Sub Command2_Click()
End
End Sub
Private Sub Form_Load()
txtUserName = ""
txtPassword = ""
End Sub
Private Sub Option1_Click()
UserType = "后臺管理人"
End Sub
Private Sub Option2_Click()
UserType = "操作員"
End Sub
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -