📄 frmstusearch.frm
字号:
VERSION 5.00
Begin VB.Form frmstusearch
BorderStyle = 3 'Fixed Dialog
Caption = "查找学生"
ClientHeight = 1560
ClientLeft = 45
ClientTop = 330
ClientWidth = 4065
Icon = "frmstusearch.frx":0000
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 1560
ScaleWidth = 4065
ShowInTaskbar = 0 'False
StartUpPosition = 1 '所有者中心
Begin VB.CommandButton Command2
Cancel = -1 'True
Caption = "关闭(&C)"
Height = 375
Left = 2640
TabIndex = 4
Top = 1080
Width = 1035
End
Begin VB.CommandButton Command1
Caption = "查找(&S)"
Default = -1 'True
Height = 375
Left = 1200
TabIndex = 3
Top = 1080
Width = 1035
End
Begin VB.TextBox Text1
Height = 300
Left = 360
TabIndex = 0
Top = 240
Width = 1695
End
Begin VB.ComboBox Combo
Height = 300
Left = 2400
Style = 2 'Dropdown List
TabIndex = 1
Top = 240
Width = 1275
End
Begin VB.CheckBox Check1
Caption = "模糊查询"
Height = 255
Left = 360
TabIndex = 2
Top = 600
Value = 1 'Checked
Width = 1035
End
Begin VB.Line Line4
BorderColor = &H00000000&
BorderStyle = 6 'Inside Solid
X1 = 0
X2 = 4140
Y1 = 960
Y2 = 960
End
End
Attribute VB_Name = "frmstusearch"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
If Text1.Text = "" Then
MsgBox "请输入要查询的关键字", vbInformation
Text1.Text = ""
Text1.SetFocus
Exit Sub
ElseIf Combo.Text = "按学号查询" Then
If Check1.Value = vbChecked Then
sqlstr = "select * from StuInfo where SID like '%" & Text1.Text & "%'"
Else
sqlstr = "select * from StuInfo where SID ='" & Text1.Text & "'"
End If
ElseIf Combo.Text = "按姓名查询" Then
If Check1.Value = vbChecked Then
sqlstr = "select * from StuInfo where SName like '%" & Text1.Text & "%'"
Else
sqlstr = "select * from StuInfo where SName ='" & Text1.Text & "'"
End If
End If
Call Frmstu.SqlListview(sqlstr)
End Sub
Private Sub Command2_Click()
Unload Me
End Sub
Private Sub Form_Load()
Combo.Clear
Combo.AddItem "按学号查询"
Combo.AddItem "按姓名查询"
Combo.ListIndex = 1
End Sub
Private Sub Form_Resize()
Text1.SetFocus
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -