📄 frm_querystudentstatus.frm
字号:
VERSION 5.00
Object = "{57EA6131-FAB3-49C3-BF10-85A4777A5A7C}#1.0#0"; "XPButton.ocx"
Begin VB.Form frm_querystudentstatus
BorderStyle = 0 'None
Caption = "查询"
ClientHeight = 2205
ClientLeft = 0
ClientTop = 0
ClientWidth = 4335
LinkTopic = "Form1"
LockControls = -1 'True
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 147
ScaleMode = 3 'Pixel
ScaleWidth = 289
ShowInTaskbar = 0 'False
Begin VB.Frame Frame1
Height = 660
Left = 585
TabIndex = 4
Top = 1305
Width = 3255
Begin XP_Button.XPButton command2
Height = 390
Left = 1800
TabIndex = 5
Top = 180
Width = 1335
_ExtentX = 2355
_ExtentY = 688
caption = "取消"
End
Begin XP_Button.XPButton command1
Height = 375
Left = 120
TabIndex = 6
Top = 180
Width = 1335
_ExtentX = 2355
_ExtentY = 661
caption = "确定"
End
End
Begin VB.OptionButton optionstudentid
Caption = "按学号查询"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 510
Left = 360
TabIndex = 3
Top = 435
Value = -1 'True
Width = 1590
End
Begin VB.OptionButton optionstudentname
Caption = "按姓名查询"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 360
TabIndex = 2
Top = 930
Width = 1590
End
Begin VB.TextBox txtstudentid
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 330
Left = 2010
MaxLength = 6
TabIndex = 1
Top = 525
Width = 1815
End
Begin VB.TextBox txtstudentname
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 330
Left = 2010
MaxLength = 10
TabIndex = 0
Top = 945
Width = 1815
End
Begin VB.Image imgclose
Height = 240
Left = 3900
Picture = "frm_querystudentstatus.frx":0000
Top = 30
Width = 240
End
Begin VB.Image imgleftwindow
Height = 1395
Left = 15
Picture = "frm_querystudentstatus.frx":0342
Stretch = -1 'True
Top = 435
Width = 465
End
Begin VB.Image imgrightwindow
Height = 1470
Left = 3855
Picture = "frm_querystudentstatus.frx":38F4
Stretch = -1 'True
Top = 450
Width = 450
End
Begin VB.Image imgbottom
Height = 450
Left = 450
Picture = "frm_querystudentstatus.frx":7C0E
Stretch = -1 'True
Top = 1725
Width = 3420
End
Begin VB.Image imgrightbottom
Height = 450
Left = 3855
Picture = "frm_querystudentstatus.frx":E550
Top = 1725
Width = 450
End
Begin VB.Image imgleftbottom
Height = 450
Left = 15
Picture = "frm_querystudentstatus.frx":F05A
Top = 1725
Width = 450
End
Begin VB.Image imglefttitle
Height = 450
Left = 0
Picture = "frm_querystudentstatus.frx":FB64
Top = 0
Width = 450
End
Begin VB.Label Label1
BackStyle = 0 'Transparent
Caption = "查询"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H8000000E&
Height = 345
Left = 570
TabIndex = 7
Top = 90
Width = 1020
End
Begin VB.Image imgrighttitle
Height = 525
Left = 3930
Picture = "frm_querystudentstatus.frx":1066E
Top = -45
Width = 375
End
Begin VB.Image imgtop
Height = 450
Left = 315
Picture = "frm_querystudentstatus.frx":11114
Stretch = -1 'True
Top = 0
Width = 3615
End
End
Attribute VB_Name = "frm_querystudentstatus"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Dim mystd As Cls_student
Dim mystr As String
Private Sub Form_Activate()
txtstudentid.SetFocus
End Sub
Private Sub Form_Load()
Set mystd = New Cls_student
SetWindow Me
AlwaysOnTop Me, False
txtstudentid = ""
txtstudentname = ""
txtstudentid.Enabled = optionstudentid.Value
txtstudentname.Enabled = optionstudentname.Value
Move (Screen.Width - Me.Width) / 2, (Screen.Height - Me.Height) / 2 '- 800
End Sub
Private Sub command1_Click()
Dim i As Integer
Me.Visible = False
If optionstudentid.Value = True Then
mystr = Trim(txtstudentid.Text)
'调用Cls_student中的方法
mystd.PrcStudentByID mystr
If mystd.GetPrcStudentRs.EOF = False Then
finded = True
DisPlay mystd.GetPrcStudentRs
Else
finded = False
MsgBox "没有该学员的记录!"
End If
Else
mystr = Trim(txtstudentname.Text)
'调用Cls_student中的方法
mystd.PrcStudentByNM mystr
If mystd.GetPrcStudentRs.EOF = False Then
finded = True
DisPlay mystd.GetPrcStudentRs
Else
finded = False
MsgBox "没有该学员的记录!"
End If
End If
Unload Me
End Sub
Private Sub command2_Click()
Unload Me
End Sub
Private Sub optionstudentid_Click()
txtstudentid.Enabled = optionstudentid.Value
txtstudentname.Enabled = optionstudentname.Value
txtstudentid = ""
txtstudentname = ""
txtstudentid.SetFocus
End Sub
Private Sub optionstudentname_Click()
txtstudentid.Enabled = optionstudentid.Value
txtstudentname.Enabled = optionstudentname.Value
txtstudentid = ""
txtstudentname = ""
txtstudentname.SetFocus
End Sub
Private Sub txtstudentid_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
command1_Click
End If
End Sub
Private Sub txtstudentname_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
command1_Click
End If
End Sub
Public Function DisPlay(StudentRs As Recordset)
'显示记录
frm_setstatus.Label4.Caption = Trim(StudentRs.Fields(0))
frm_setstatus.Label3.Caption = Trim(StudentRs.Fields(16))
End Function
Private Sub imgclose_Click()
Unload Me
End Sub
Private Sub imglefttitle_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
DrawForms Me
End Sub
Private Sub imgtop_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
DrawForms Me
End Sub
Private Sub imgrighttitle_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
DrawForms Me
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -