📄 学生管理系统.frm
字号:
VERSION 5.00
Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "mscomctl.ocx"
Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX"
Begin VB.Form Denglu
Caption = "学生管理系统"
ClientHeight = 6150
ClientLeft = 60
ClientTop = 345
ClientWidth = 8385
ForeColor = &H000000FF&
LinkTopic = "Form1"
Picture = "学生管理系统.frx":0000
ScaleHeight = 6150
ScaleWidth = 8385
StartUpPosition = 3 '窗口缺省
Begin VB.Timer Timer1
Interval = 1000
Left = 600
Top = 4680
End
Begin VB.ComboBox cbuser
DataSource = "Adodc1"
Height = 300
ItemData = "学生管理系统.frx":AB764
Left = 1560
List = "学生管理系统.frx":AB766
TabIndex = 7
Top = 1440
Width = 1815
End
Begin VB.TextBox txtpasswd
Height = 300
IMEMode = 3 'DISABLE
Left = 1560
PasswordChar = "*"
TabIndex = 6
Top = 2400
Width = 1815
End
Begin MSAdodcLib.Adodc Adodc1
Height = 330
Left = 120
Top = 240
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= 3
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
BackColor = &H0080C0FF&
Caption = "退出"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 2400
MaskColor = &H0080C0FF&
Style = 1 'Graphical
TabIndex = 2
Top = 3960
Width = 1215
End
Begin VB.CommandButton Command1
BackColor = &H0080C0FF&
Caption = "登陆"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 600
MaskColor = &H8000000F&
Style = 1 'Graphical
TabIndex = 1
Top = 3960
Width = 1095
End
Begin MSComctlLib.StatusBar StatusBar1
Align = 2 'Align Bottom
Height = 375
Left = 0
TabIndex = 3
Top = 5775
Width = 8385
_ExtentX = 14790
_ExtentY = 661
_Version = 393216
BeginProperty Panels {8E3867A5-8586-11D1-B16A-00C0F0283628}
NumPanels = 4
BeginProperty Panel1 {8E3867AB-8586-11D1-B16A-00C0F0283628}
Style = 6
Alignment = 1
TextSave = "2004-12-20"
EndProperty
BeginProperty Panel2 {8E3867AB-8586-11D1-B16A-00C0F0283628}
Style = 5
Alignment = 1
TextSave = "16:18"
EndProperty
BeginProperty Panel3 {8E3867AB-8586-11D1-B16A-00C0F0283628}
Alignment = 1
Object.Width = 7038
MinWidth = 7038
Text = "学生管理系统"
TextSave = "学生管理系统"
EndProperty
BeginProperty Panel4 {8E3867AB-8586-11D1-B16A-00C0F0283628}
Alignment = 1
EndProperty
EndProperty
End
Begin VB.Label Label3
BackStyle = 0 'Transparent
Caption = "密码"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H0080C0FF&
Height = 615
Left = 360
TabIndex = 5
Top = 2520
Width = 1695
End
Begin VB.Label Label2
BackStyle = 0 'Transparent
Caption = "操作员"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H0080C0FF&
Height = 615
Left = 360
TabIndex = 4
Top = 1440
Width = 1695
End
Begin VB.Label Label1
BackColor = &H00C00000&
BackStyle = 0 'Transparent
Caption = "学生管理系统"
BeginProperty Font
Name = "华文行楷"
Size = 27.75
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H0000FFFF&
Height = 735
Left = 1920
TabIndex = 0
Top = 120
Width = 4455
End
Begin VB.Line Line1
BorderColor = &H0000FF00&
X1 = 720
X2 = 7440
Y1 = 840
Y2 = 840
End
End
Attribute VB_Name = "Denglu"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Declare Function AnimateWindow Lib "user32" (ByVal hdc As Long, ByVal ms As Long, style As Long) As Long
Dim addc As Adodc
Dim tim As Integer
Dim myvar As String
Dim a As Integer
Private Sub Command1_Click()
Dim user As String
If tim = 3 Then
myvar = MsgBox("密码输入错误,请向管理员查询!", 0, "")
If myvar = vbOK Then End
End If
If cbuser.Text = "" Then
MsgBox ("请输入登陆ID")
cbuser.SetFocus
Else
If cbuser.Text = "管理员" Then
user = "0222200052"
Else
user = cbuser.Text
End If
Adodc1.RecordSource = "select * from Manage_user where user_id=" & user
Adodc1.Refresh
If txtpasswd.Text = Adodc1.Recordset.Fields("user_password") Then
Dim isadmin As String
isadmin = Adodc1.Recordset.Fields("user_isadmin")
If isadmin = "True" Then
Load main
main.StatusBar1.Panels(4).Text = "" & Adodc1.Recordset.Fields("user_name")
main.Show
Unload Me
Else
Load mainstu
mainstu.Show
mainstu.StatusBar1.Panels(4).Text = "" & Adodc1.Recordset.Fields("user_name")
Unload Me
End If
Else
MsgBox ("密码输入错误,请重新输入")
tim = tim + 1
txtpasswd.SetFocus
End If
End If
End Sub
Private Sub Command2_Click()
End
End Sub
Private Sub Command3_Click()
Form2.Show
End Sub
Private Sub Form_Initialize()
r = AnimateWindow(Me.hWnd, 200, 16)
End Sub
Private Sub Form_Load()
r = AnimateWindow(Me.hWnd, 200, 16)
Adodc1.ConnectionString = cnn()
cbuser.AddItem ("管理员")
End Sub
Private Sub Timer1_Timer()
Label1.ForeColor = Label1.ForeColor - 5000
If Label1.ForeColor <= 10000 Then
Label1.ForeColor = &HFF00FF
End If
If a = 10 Then
a = 0
End If
a = a + 1
Label1.Caption = seekCaption(a)
End Sub
Function seekCaption(a) As String
If a = 10 Then
seekCaption = "学生管理系统"
End If
If a = 9 Then
seekCaption = "学生管理系统"
End If
If a = 8 Then
seekCaption = "学生管理系统"
End If
If a = 7 Then
seekCaption = "学生管理系统"
End If
If a = 6 Then
seekCaption = "学生管理系统"
End If
If a = 5 Then
seekCaption = "学生管理系"
End If
If a = 4 Then
seekCaption = "学生管理"
End If
If a = 3 Then
seekCaption = "学生管"
End If
If a = 2 Then
seekCaption = "学生"
End If
If a = 1 Then
seekCaption = "学"
End If
If a = 0 Then
seekCaption = ""
End If
End Function
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -