📄 form1.frm
字号:
EndProperty
Caption = "退出系统"
MouseIcon = "Form1.frx":759E5
MousePointer = 99
End
Begin StoneXP.XPButton c1
Height = 375
Index = 0
Left = 0
TabIndex = 16
Top = 0
Width = 1575
_ExtentX = 2778
_ExtentY = 661
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Caption = "学生管理"
MouseIcon = "Form1.frx":75CFF
MousePointer = 99
End
End
Begin StoneXP.XPFrame XPFrame1
Height = 930
Left = 1875
TabIndex = 0
Top = 8240
Width = 10200
_ExtentX = 17992
_ExtentY = 1640
Caption = ""
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
LeftSpace = 0
TopSpace = 0
RightSpace = 0
BottomSpace = 0
CapTionLeft = 0
CaptionTop = 0
RoundSize = 0
Begin StoneXP.XPButton XPButton4
Height = 375
Left = 6000
TabIndex = 1
ToolTipText = "只可修改鼠标所在行"
Top = 150
Width = 1095
_ExtentX = 1931
_ExtentY = 661
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
FontColor = 16711680
ButtonStyle = 2
Caption = "提交修改"
MouseIcon = "Form1.frx":76019
MousePointer = 99
End
Begin StoneXP.XPButton XPButton5
Height = 375
Left = 4680
TabIndex = 2
ToolTipText = "确认从添加开始"
Top = 150
Width = 1095
_ExtentX = 1931
_ExtentY = 661
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
FontColor = 255
ButtonStyle = 2
Caption = "提交保存"
MouseIcon = "Form1.frx":76333
MousePointer = 99
End
Begin StoneXP.XPButton XPButton6
Height = 375
Left = 7320
TabIndex = 4
ToolTipText = "删除鼠标当前所在行"
Top = 150
Width = 1095
_ExtentX = 1931
_ExtentY = 661
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
FontColor = 16711680
ButtonStyle = 2
Caption = "删 除"
MouseIcon = "Form1.frx":7664D
MousePointer = 99
End
Begin StoneXP.XPButton XPButton8
Height = 375
Index = 0
Left = 8640
TabIndex = 17
ToolTipText = "输入当前光标处学生成绩"
Top = 150
Width = 1095
_ExtentX = 1931
_ExtentY = 661
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
FontColor = 255
ButtonStyle = 1
Caption = "查询成绩"
MouseIcon = "Form1.frx":76967
MousePointer = 99
End
End
Begin FlexCell.Grid Grid1
Height = 6000
Left = 1875
TabIndex = 5
Top = 2235
Width = 10140
_ExtentX = 17886
_ExtentY = 10583
Appearance = 0
Cols = 8
Rows = 21
End
Begin FlexCell.Grid Grid2
Height = 6000
Left = 1875
TabIndex = 18
Top = 2235
Width = 10140
_ExtentX = 17886
_ExtentY = 10583
Appearance = 0
Cols = 6
Rows = 21
End
Begin StoneXP.XPButton XPButton1
Height = 375
Left = 9360
TabIndex = 19
Top = 1800
Width = 1095
_ExtentX = 1931
_ExtentY = 661
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ButtonStyle = 1
Caption = "上一页"
MouseIcon = "Form1.frx":76C81
MousePointer = 99
End
Begin StoneXP.XPButton XPButton2
Height = 375
Left = 10680
TabIndex = 20
Top = 1800
Width = 1095
_ExtentX = 1931
_ExtentY = 661
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ButtonStyle = 1
Caption = "下一页"
MouseIcon = "Form1.frx":76F9B
MousePointer = 99
End
Begin VB.Label Label1
Alignment = 2 'Center
BackStyle = 0 'Transparent
Caption = "共0页 第0页"
ForeColor = &H00000000&
Height = 255
Left = 7440
TabIndex = 21
Top = 1880
Width = 1575
End
Begin VB.Image Image3
Height = 6630
Index = 1
Left = 1730
Picture = "Form1.frx":772B5
Top = 2240
Width = 150
End
Begin VB.Image Image2
Height = 255
Index = 1
Left = 150
Picture = "Form1.frx":7D48B
Top = 8640
Width = 1575
End
Begin VB.Image Image2
Height = 255
Index = 0
Left = 150
Picture = "Form1.frx":8123F
Top = 2240
Width = 1575
End
Begin VB.Image Image3
Height = 6630
Index = 0
Left = 0
Picture = "Form1.frx":84FF3
Top = 2240
Width = 150
End
Begin VB.Label Label2
BackStyle = 0 'Transparent
ForeColor = &H000000FF&
Height = 615
Left = 240
TabIndex = 3
Top = 1560
Width = 7095
End
End
Attribute VB_Name = "form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim i, j, n As Integer
Dim sql As String
Private Declare Function GetKeyState Lib "user32" _
(ByVal nVirtKey As Long) As Integer
Public je As Integer '记忆菜单上次数值,实现数据传送
Private Sub acg_Click()
Call asPopup7_Click(False)
End Sub
Private Sub addcg_Click()
Call asPopup6_Click(False)
End Sub
Private Sub addstudent_Click()
Call asPopup2_Click(False)
End Sub
Private Sub asPopup1_Click(Cancel As Boolean)
Grid1.Visible = True
Grid2.Visible = False
tkbase = "学生信息"
fnumber = 13
sql = "select * from " & tkbase
grid1pz '执行grid1的分配空间任务
datagrid '按要求读取数据空间
End Sub
Private Sub grid1pz()
Grid1.Cols = fnumber + 1
Grid1.Column(1).Width = 120
Grid1.Column(2).Width = 100
Grid1.Column(3).Width = 80
Grid1.Column(4).Width = 40
Grid1.Column(5).Width = 80
Grid1.Column(6).Width = 30
Grid1.Column(7).Width = 100
Grid1.Column(8).Width = 200
Grid1.Column(9).Width = 60
Grid1.Column(10).Width = 80
Grid1.Column(11).Width = 100
Grid1.Column(12).Width = 100
Grid1.Column(13).Width = 100
Grid1.Column(4).CellType = cellComboBox
Grid1.ComboBox(4).Clear
Grid1.ComboBox(4).AddItem "男"
Grid1.ComboBox(4).AddItem "女"
Grid1.Column(5).CellType = cellCalendar
Grid1.Column(1).Locked = True
End Sub
Private Sub asPopup2_Click(Cancel As Boolean)
Grid1.Visible = True
Grid2.Visible = False
tkbase = "学生信息"
fnumber = 13
Set qy1 = cnn.Execute("select * from " & tkbase)
grid1pz
For i = 1 To fnumber
Grid1.Cell(0, i).Text = qy1.Fields(i - 1).Name
Next
Grid1.Column(1).Locked = False
Grid1.Rows = 1
Grid1.Rows = 21
gridsave = True '允许保存
griddelete = False '拒绝删除
gridedit = False
End Sub
Private Sub asPopup3_Click(Cancel As Boolean)
Dim fo2 As CTranslucentForm
Set fo2 = New CTranslucentForm
fo2.hWnd = Form2.hWnd
fo2.Alpha = 90 / 100 * 255
Me.WindowState = vbMinimized
Load Form2
Form2.Show 1
End Sub
Private Sub asPopup4_Click(Cancel As Boolean)
Dim fo2 As CTranslucentForm
Set fo2 = New CTranslucentForm
fo2.hWnd = Form4.hWnd
fo2.Alpha = 90 / 100 * 255
Me.WindowState = vbMinimized
Load Form4
Form4.Show 1
End Sub
Private Sub asPopup5_Click(Cancel As Boolean)
MsgBox "非完整源码不可查询!"
End Sub
Private Sub asPopup6_Click(Cancel As Boolean)
Grid1.Visible = False
Grid2.Visible = True
tkbase = "学生与课程"
fnumber = 5
gridpz2
Set qy1 = cnn.Execute("select * from " & tkbase)
For i = 1 To fnumber
Grid2.Cell(0, i).Text = qy1.Fields(i - 1).Name
Next
Grid2.Rows = 1
Grid2.Rows = 21
gridsave = True
gridedit = False
griddel = False
Grid2.Column(1).Locked = False
Grid2.Column(2).Locked = False
Grid2.Column(3).Locked = False
End Sub
Private Sub asPopup7_Click(Cancel As Boolean)
Grid1.Visible = False
Grid2.Visible = True
tkbase = "学生与课程"
fnumber = 5
sql = "select * from " & tkbase
gridpz2
datagrid
gridsave = False
gridedit = True
griddel = True
Grid2.Column(1).Locked = True
Grid2.Column(2).Locked = True
Grid2.Column(3).Locked = True
End Sub
Private Sub gridpz2()
Grid2.Cols = 7
Grid2.Column(1).CellType = cellComboBox
Set qy1 = cnn.Execute("select 课程号 from 课程")
Grid2.ComboBox(1).Clear
Do While Not qy1.EOF
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -