📄 frm_denglu.frm
字号:
VERSION 5.00
Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX"
Begin VB.Form frm_denglu
BorderStyle = 3 'Fixed Dialog
Caption = "系统登陆"
ClientHeight = 2265
ClientLeft = 45
ClientTop = 450
ClientWidth = 4080
Icon = "frm_denglu.frx":0000
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 2265
ScaleWidth = 4080
ShowInTaskbar = 0 'False
StartUpPosition = 1 '所有者中心
Begin MSAdodcLib.Adodc Adodc1
Height = 375
Left = 360
Top = 0
Visible = 0 'False
Width = 1200
_ExtentX = 2117
_ExtentY = 661
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.TextBox Text1
Appearance = 0 'Flat
BackColor = &H80000018&
Height = 300
IMEMode = 3 'DISABLE
Left = 1200
PasswordChar = "*"
TabIndex = 4
Top = 1080
Width = 1815
End
Begin VB.ComboBox Combo1
Appearance = 0 'Flat
BackColor = &H80000018&
DataSource = "Adodc1"
Height = 300
ItemData = "frm_denglu.frx":164A
Left = 1200
List = "frm_denglu.frx":164C
TabIndex = 2
Top = 520
Width = 1815
End
Begin VB.PictureBox Picture1
AutoSize = -1 'True
BorderStyle = 0 'None
Height = 480
Left = 3360
Picture = "frm_denglu.frx":164E
ScaleHeight = 480
ScaleWidth = 615
TabIndex = 0
Top = 120
Width = 615
End
Begin VB.Label Label4
BackStyle = 0 'Transparent
Caption = "取 消"
Height = 255
Left = 2950
TabIndex = 6
Top = 1855
Width = 735
End
Begin VB.Image Image2
Height = 285
Left = 2640
Picture = "frm_denglu.frx":1AF0
Top = 1800
Width = 1005
End
Begin VB.Label Label3
BackStyle = 0 'Transparent
Caption = "登 陆"
Height = 255
Left = 810
MousePointer = 1 'Arrow
TabIndex = 5
Top = 1855
Width = 735
End
Begin VB.Image Image1
Height = 285
Left = 480
Picture = "frm_denglu.frx":1EA0
Top = 1800
Width = 1005
End
Begin VB.Line Line1
X1 = 240
X2 = 3960
Y1 = 1560
Y2 = 1560
End
Begin VB.Label Label2
Caption = "口令(P):"
Height = 255
Left = 360
TabIndex = 3
Top = 1200
Width = 735
End
Begin VB.Label Label1
Caption = "用户(U):"
Height = 255
Left = 360
TabIndex = 1
Top = 600
Width = 735
End
End
Attribute VB_Name = "frm_denglu"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Dim sql As String
Public UseCode As String
Public OK As Boolean
Private Sub Form_Load()
Adodc1.ConnectionString = PublicStr
Adodc1.RecordSource = "select 用户帐号 from username"
Adodc1.Refresh
Adodc1.Recordset.MoveFirst
Do While Adodc1.Recordset.EOF = False
Combo1.AddItem Adodc1.Recordset("用户帐号").Value
Adodc1.Recordset.MoveNext
Loop
End Sub
Private Sub Form_Unload(Cancel As Integer)
Unload Me
End Sub
Private Sub Label3_Click()
Screen.MousePointer = 11
If Combo1.Text = "" Then
MsgBox "请您选择用户名!", vbExclamation, "提示"
Combo1.SetFocus
Screen.MousePointer = 0
Exit Sub
End If
Adodc1.CommandType = adCmdText
sql = "select * from username where 用户帐号='" & Combo1.Text & "'"
Adodc1.RecordSource = sql
Adodc1.Refresh
If Adodc1.Recordset.RecordCount = 0 Then
MsgBox "非法用户,无权使用本系统!", vbCritical, "提示"
Exit Sub
Else
If Text1.Text = Trim(Adodc1.Recordset("密码").Value) Then
UseCode = Trim(Adodc1.Recordset("用户权限").Value)
Quanxian (UseCode)
Else
MsgBox "密码错误,请重新输入密码!", vbCritical, "提示"
Text1.Text = ""
Text1.SetFocus
End If
End If
End Sub
Private Sub Label3_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
Label3.ForeColor = &H0&
End Sub
Private Sub Label3_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Label3.ForeColor = &H80&
End Sub
Private Sub Label4_Click()
Unload Me
Exit Sub
End Sub
Private Sub Label4_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
Label4.ForeColor = &H0&
End Sub
Private Sub Label4_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Label4.ForeColor = &H80&
End Sub
Private Sub Text1_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then Call Label3_Click
End Sub
Public Sub Quanxian(X As String)
If X = "所有权限" Then
MDIForm1.Show
Unload Me
Screen.MousePointer = 0
Else
MDIForm1.yhgl.Enabled = False
MDIForm1.yhzc.Enabled = False
MDIForm1.ljcz.Enabled = False
MDIForm1.qlcz.Enabled = False
MDIForm1.ljcs.Enabled = False
MDIForm1.qlcs.Enabled = False
MDIForm1.szdj.Enabled = False
MDIForm1.ztsz.Enabled = False
MDIForm1.Show
Unload Me
Screen.MousePointer = 0
End If
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -