📄 sheet1.frm
字号:
End
Begin VB.Menu menu_edit_change_0
Caption = "修改顶格标题"
End
Begin VB.Menu menu_edit_change_row
Caption = "修改行标题"
End
Begin VB.Menu menu_edit_insert_row
Caption = "插入行"
End
Begin VB.Menu menu_edit_clear_row
Caption = "清除行"
End
Begin VB.Menu menu_edit_delete_row
Caption = "删除行"
End
Begin VB.Menu menu_edit_change_col
Caption = "修改列标题"
End
Begin VB.Menu menu_edit_insert_col
Caption = "插入列"
End
Begin VB.Menu menu_edit_clear_col
Caption = "清除列"
End
Begin VB.Menu menu_edit_delete_col
Caption = "删除列"
End
Begin VB.Menu menu_col_copy
Caption = "复制列"
End
Begin VB.Menu menu_col_paste
Caption = "粘贴列"
End
End
Begin VB.Menu menu_course
Caption = "学科(&X)"
Begin VB.Menu menu_open_empty_course
Caption = "打开学科模板"
End
Begin VB.Menu menu_send_col_to_course
Caption = "发送列到班级工作表"
End
End
Begin VB.Menu menu_class
Caption = "班级(&B)"
Begin VB.Menu menu_open_empty_class
Caption = "打开班级模板"
End
Begin VB.Menu menu_send_class_to_grade
Caption = "发送班级工作表到年级工作表"
End
End
Begin VB.Menu menu_nianji
Caption = "年级(&N)"
Begin VB.Menu meun_subclass
Caption = "删除班级"
End
End
Begin VB.Menu menu_jisuan
Caption = "计算(&J)"
Begin VB.Menu menu_lie
Caption = "选定列"
Begin VB.Menu menu_all
Caption = "全部项目"
End
Begin VB.Menu menu_zongfen
Caption = "列总分"
End
Begin VB.Menu menu_zongpingjun
Caption = "列平均"
End
Begin VB.Menu menu_zuigaofen
Caption = "最高分"
End
Begin VB.Menu menu_zuidifen
Caption = "最低分"
End
Begin VB.Menu menu_jigeli
Caption = "及格率"
End
Begin VB.Menu menu_youxiuli
Caption = "优秀率"
End
Begin VB.Menu menu_col_sort
Caption = "列排序"
End
Begin VB.Menu menu_col_mingci
Caption = "列名次"
End
Begin VB.Menu menu_coldiv
Caption = "列除以"
End
Begin VB.Menu menu_col_mul
Caption = "列乘以"
End
End
Begin VB.Menu menu_hang
Caption = "行"
Begin VB.Menu menu_hang_zongfen
Caption = "学生个人总分"
End
End
End
Begin VB.Menu menu_work_table
Caption = "工作表(&T)"
Begin VB.Menu menu_work_table_course
Caption = "学科工作表"
End
Begin VB.Menu menu_work_table_class
Caption = "班级工作表"
End
Begin VB.Menu menu_work_table_grade
Caption = "年级工作表"
End
End
Begin VB.Menu menu_set
Caption = "设置(&S)"
Begin VB.Menu menu_set_system
Caption = "系统"
End
Begin VB.Menu menu_set_youxiujige
Caption = "列优秀分及格分"
End
End
Begin VB.Menu menu_help
Caption = "帮助(&H)"
Begin VB.Menu menu_helphelp
Caption = "帮助"
End
Begin VB.Menu MENU_ZUOZHE
Caption = "作者"
End
End
End
Attribute VB_Name = "sheet1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Dim oldrc As Integer
Dim editselctall As Boolean
Private Sub Cmd_exitjigeyouxiu_Click()
Frame_jigeyouxiu.Visible = False
End Sub
Private Sub Cmd_muldiv_Click()
On Error GoTo ErrHandler
Dim i, k As Integer
Dim div, mm As Single
div = CSng(Text_muldiv.Text)
If grid.ColSel > 0 And grid.RowSel = Crow_max Then
k = MsgBox("确实要修改《 " + grid.TextMatrix(0, grid.ColSel) + " 》列的内容么?", vbYesNo)
If k = vbYes Then
For i = 1 To Crow_max
If grid.TextMatrix(i, grid.ColSel) <> "" Then
mm = CSng(grid.TextMatrix(i, grid.ColSel))
If mul_div = C_div Then
mm = Int(10 * (mm / div)) / 10
ElseIf mul_div = C_mul Then
mm = Int(10 * (mm * div)) / 10
End If
grid.TextMatrix(i, grid.ColSel) = mm
End If
Next
If mul_div = C_div Then
mm = col_youxiu(grid.ColSel)
mm = Int(10 * (mm / div)) / 10
col_youxiu(grid.ColSel) = mm
mm = col_jige(grid.ColSel)
mm = Int(10 * (mm / div)) / 10
col_jige(grid.ColSel) = mm
ElseIf mul_div = C_mul Then
mm = col_youxiu(grid.ColSel)
mm = Int(10 * (mm * div)) / 10
col_youxiu(grid.ColSel) = mm
mm = col_jige(grid.ColSel)
mm = Int(10 * (mm * div)) / 10
col_jige(grid.ColSel) = mm
End If
End If
Else
MsgBox "请先选择一个列!"
End If
Frame_muldiv.Visible = False
Exit Sub
ErrHandler:
Call net_ERR_center(1, Err.Number, Err.Description, "")
End Sub
Private Sub Cmd_muldiv_exit_Click()
Frame_muldiv.Visible = False
End Sub
Private Sub Cmd_setjigeyouiu_Click()
On Error GoTo ErrHandler
col_jige(grid.ColSel) = CInt(Text_jige.Text)
col_youxiu(grid.ColSel) = CInt(Text_youxiu.Text)
'MsgBox grid.ColSel
'MsgBox col_youxiu(grid.ColSel)
Frame_jigeyouxiu.Visible = False
Exit Sub
ErrHandler:
Call net_ERR_center(1, Err.Number, Err.Description, "")
End Sub
Private Sub Cmd_sysytem_Click()
On Error GoTo ErrHandler
Dim txt As String
Dim i As Integer
shool_name = Text_shoolname.Text
App.Title = shool_name + "成绩管理系统ver1.00"
txt = Me.Caption
i = InStr(txt, " ")
txt = Mid(txt, i)
Me.Caption = App.Title + txt
Frame_system.Visible = False
Call save_shoolname
Exit Sub
ErrHandler:
Call net_ERR_center(1, Err.Number, Err.Description, "")
End Sub
Private Sub Cmd_sysytem_exit_Click()
Frame_system.Visible = False
End Sub
Private Sub Cmd_template_Click()
Dim snoi, j, i As Integer
Dim ss As String
Dim rndyw, rndsx, rndzr, rndyy, rndty, rndsh As Integer
On Error GoTo ErrHandler
'If temp_template = C_template_class Then
snoi = CInt(Text_class_no.Text)
ss = Text_class_name.Text
If snoi > 0 And ss <> "" Then
Call CLEAN_GRID(0, Crow_max, 0, Ccol_max)
For j = 1 To snoi
grid.TextMatrix(j, 0) = j
grid.TextMatrix(j, 1) = ss
' grid.TextMatrix(j, 2) = Chr(64 + (j Mod 26))
'
' rndyw = Int(Rnd(1) * 100)
' rndsx = Int(Rnd(1) * 100)
' rndzr = Int(Rnd(1) * 100)
' rndsx = Int(Rnd(1) * 100)
' rndyy = Int(Rnd(1) * 100)
' rndty = Int(Rnd(1) * 100)
' rndsh = Int(Rnd(1) * 100)
'
'
'
' grid.TextMatrix(j, 3) = rndyw
' grid.TextMatrix(j, 4) = rndsx
' grid.TextMatrix(j, 5) = rndyy
' grid.TextMatrix(j, 6) = rndzr
' grid.TextMatrix(j, 7) = rndsh
' grid.TextMatrix(j, 8) = rndty
Next j
grid.TextMatrix(snoi + 1, 0) = "*********"
For j = snoi + 2 To Crow_max
grid.TextMatrix(j, 0) = ""
Next j
grid.TextMatrix(0, 0) = "学号"
grid.TextMatrix(0, 1) = "班级"
grid.TextMatrix(0, 2) = "姓名"
For i = 0 To 9
grid.TextMatrix(0, i + 3) = Text_course(i).Text
Next
End If
'End If
Text1.Visible = False
Frame_template_class.Visible = False
Me.Caption = App.Title
Exit Sub
ErrHandler:
Call net_ERR_center(1, Err.Number, Err.Description, "")
End Sub
Private Sub Cmd_templateexit_Click()
Frame_template_class.Visible = False
End Sub
Private Sub Form_Load()
Dim i As Integer
On Error GoTo ErrHandler
Call open_shoolname
App.Title = shool_name + "成绩管理系统ver1.00"
Me.Caption = App.Title + " 班级工作表"
Me.Top = 0
Me.Left = 0
Me.Height = Screen.Height - Text1.Height
Me.Width = Screen.Width
grid.Width = Me.Width - 2 * Text1.Height
grid.Height = Me.Height - 4 * Text1.Height
For i = 0 To Ccol_max
col_youxiu(i) = 80
col_jige(i) = 60
Next
grid.Row = 1
grid.Col = 1
Text1.Text = ""
Text1.Visible = False
Text1.Top = grid.Top + grid.CellTop
Text1.Left = grid.Left + grid.CellLeft
Text1.Width = grid.CellWidth
Text1.Height = grid.CellHeight
Text1.Text = grid.Text
Text1.Visible = True
Exit Sub
ErrHandler:
Call net_ERR_center(1, Err.Number, Err.Description, "")
End Sub
Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)
On Error GoTo errmsg
Dim MSG, readTXT As String
Dim a As Integer
MSG = "将要退出:" + Chr(7) + Chr(13) + App.Title + Chr(7) + Chr(13) + "你也许要做保存工作" + Chr(7) + Chr(13) + "真的要退出么?"
a = MsgBox(MSG, vbYesNo + 48)
If a = vbYes Then
End
Else '放弃退出
Cancel = True
End If
Exit Sub
errmsg:
MsgBox Error$
End
End Sub
Private Sub grid_EnterCell()
If editselctall = True Then
Exit Sub
End If
If grid.MouseCol = 0 Or grid.MouseRow = 0 Then
oldrc = 0
Text1.Visible = False
Exit Sub
End If
oldrc = 1
grid.Row = grid.MouseRow
grid.Col = grid.MouseCol
Text1.Text = ""
Text1.Visible = False
Text1.Top = grid.Top + grid.CellTop
Text1.Left = grid.Left + grid.CellLeft
Text1.Width = grid.CellWidth
Text1.Height = grid.CellHeight
Text1.Text = grid.Text
Text1.Visible = True
Text1.SetFocus
End Sub
Private Sub grid_LeaveCell()
If editselctall = True Then
Exit Sub
End If
If oldrc = 0 Then
Exit Sub
End If
grid.Text = Text1.Text
End Sub
Private Sub menu_addclass_Click()
On Error GoTo ErrHandler
Dim i, r As Integer
For i = 0 To 50
If grid.TextMatrix(i, 0) = "" Then
r = i
Exit For
End If
Next
grid.TextMatrix(r, 0) = r
'On Error GoTo ErrHandler
Exit Sub
ErrHandler:
Call net_ERR_center(1, Err.Number, Err.Description, "")
End Sub
Private Sub menu_all_Click()
On Error GoTo ErrHandler
Dim findd, i As Integer
Dim colseled As Boolean
If grid.ColSel > 0 And grid.RowSel = Crow_max Then
colseled = True
End If
findd = 0
For i = 0 To 10
If Check(i).Value = 1 Then
findd = 1
End If
Next i
If findd = 0 And colseled = False Then
MsgBox "先选择计算项目!"
Exit Sub
End If
Call menu_zongfen_Click
Call menu_zongpingjun_Click
Call menu_zuigaofen_Click
Call menu_zuidifen_Click
Call menu_jigeli_Click
Call menu_youxiuli_Click
Exit Sub
ErrHandler:
Call net_ERR_center(1, Err.Number, Err.Description, "")
End Sub
Private Sub menu_col_copy_Click()
If grid.ColSel > 0 And grid.RowSel = Crow_max Then
Clipboard.SetText grid.Clip
col_name = grid.TextMatrix(0, grid.ColSel)
Else
MsgBox "请先选择一个列!"
End If
End Sub
Private Sub menu_col_mingci_Click()
Dim i, j, send, ps, findd As Integer
Dim ssum As Single
Dim colseled As Boolean
Dim ss As String
Dim cj(1 To Crow_max) As Single
Dim maxcj As Single
On Error GoTo ErrHandler
'Dim colseled As Boolean
If grid.ColSel > 0 And grid.RowSel = Crow_max Then
colseled = True
End If
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -