📄 切换用户.frm
字号:
VERSION 5.00
Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX"
Object = "{B0091D05-CC1B-4896-A94A-29B75E80ABE9}#5.0#0"; "XpControls.ocx"
Begin VB.Form frmQieHuan
BorderStyle = 1 'Fixed Single
Caption = " 切 换 用 户 . ."
ClientHeight = 4380
ClientLeft = 45
ClientTop = 435
ClientWidth = 6150
Icon = "切换用户.frx":0000
LinkTopic = "Form1"
MaxButton = 0 'False
MDIChild = -1 'True
ScaleHeight = 4380
ScaleWidth = 6150
Begin dlocx.XPFrame frame1
Height = 1335
Left = 120
TabIndex = 0
Top = 0
Width = 4335
_ExtentX = 7646
_ExtentY = 2355
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
FontName = "宋体"
FontSize = 9
FontBold = 0 'False
FontItalic = 0 'False
Begin VB.TextBox TxtPass
Appearance = 0 'Flat
ForeColor = &H000080FF&
Height = 270
IMEMode = 3 'DISABLE
Left = 2040
MaxLength = 15
PasswordChar = "*"
TabIndex = 2
Top = 555
Width = 2175
End
Begin VB.TextBox TxtUser
Appearance = 0 'Flat
ForeColor = &H000080FF&
Height = 270
IMEMode = 3 'DISABLE
Left = 2040
MaxLength = 15
TabIndex = 1
Top = 240
Width = 2175
End
Begin dlocx.xpcmdbutton Command2
Height = 300
Left = 3360
TabIndex = 4
Top = 900
Width = 795
_ExtentX = 1402
_ExtentY = 529
Caption = "取消退出"
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
End
Begin dlocx.xpcmdbutton Command3
Height = 300
Left = 2040
TabIndex = 3
Top = 900
Width = 795
_ExtentX = 1402
_ExtentY = 529
Caption = "确定进入"
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
End
Begin VB.Image Image2
Height = 780
Left = 120
Picture = "切换用户.frx":058A
Top = 240
Width = 780
End
Begin VB.Label Label4
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "登陆密码:"
Height = 180
Left = 1080
TabIndex = 6
Top = 600
Width = 900
End
Begin VB.Label Label3
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "用户名称:"
Height = 180
Left = 1080
TabIndex = 5
Top = 240
Width = 900
End
End
Begin MSAdodcLib.Adodc Adodc1
Height = 375
Left = 1800
Top = 1920
Visible = 0 'False
Width = 1935
_ExtentX = 3413
_ExtentY = 661
ConnectMode = 0
CursorLocation = 3
IsolationLevel = -1
ConnectionTimeout= 15
CommandTimeout = 30
CursorType = 3
LockType = 3
CommandType = 2
CursorOptions = 0
CacheSize = 50
MaxRecords = 0
BOFAction = 0
EOFAction = 0
ConnectStringType= 1
Appearance = 1
BackColor = -2147483643
ForeColor = -2147483640
Orientation = 0
Enabled = -1
Connect = "Provider=SQLOLEDB.1;Persist Security Info=False;User ID=sa;Initial Catalog=Bookdate;Data Source=127.0.0.1"
OLEDBString = "Provider=SQLOLEDB.1;Persist Security Info=False;User ID=sa;Initial Catalog=Bookdate;Data Source=127.0.0.1"
OLEDBFile = ""
DataSourceName = ""
OtherAttributes = ""
UserName = "sa"
Password = ""
RecordSource = "Manage_User"
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
End
Attribute VB_Name = "frmQieHuan"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command2_Click()
Unload Me
End Sub
Private Sub Command3_Click()
If Trim(TxtUser) = "" Or Trim(TxtPass) = "" Then
MsgBox "密码或用户名不能为空", vbOKOnly + vbInformation, "用户切换提示"
Info
Exit Sub
Else
Adodc1.CommandType = adCmdText
Adodc1.RecordSource = "select username,password,quanxian from Manage_User where username='" + Trim(TxtUser.Text) + "'"
Adodc1.Refresh
Dim ss%
ss = Adodc1.Recordset.Fields("quanxian")
If Adodc1.Recordset.RecordCount = 0 Then
MsgBox "没有此用户", vbOKOnly, "错误"
Exit Sub
End If
user = Adodc1.Recordset.Fields(0)
pass = Adodc1.Recordset.Fields(1)
QX = Adodc1.Recordset.Fields(2)
If Trim(TxtUser) = "" Or Trim(TxtPass) = "" Then
MsgBox "密码或用户名不能为空", vbOKOnly + vbInformation, "用户切换提示"
Info
ElseIf Trim(TxtUser.Text) <> user Or Trim(TxtPass.Text) <> pass Then
MsgBox "密码或用户名不符,请向管理员查询!", vbOKOnly + vbInformation, "用户名或密码错误"
Info
ElseIf TxtUser = user And TxtPass = pass Then
QX = ss: Info
QuanXian
Unload Me
End If
End If
End Sub
Private Sub Form_Load()
frmQieHuan.Height = 1900
frmQieHuan.Width = 4600
End Sub
Private Sub Info()
TxtUser = ""
TxtPass = ""
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -