升级后,在任何表格中点数值列的标题,都出现以下提示的报错:
此主题相关图片如下:2022052601.png


此主题相关图片如下:2022052602.png

用消息排查了一下,就是菜单中systemidle事件中下面这段代码的问题:'以下代码用于在状态栏显示自动计算结果,如果不需要自动计算,可删除这一段
Dim t As Table = CurrentTable
If Vars("SysUpdateAggregate")
If System.Windows.Forms.Control.MouseButtons <> System.Windows.Forms.MouseButtons.None OrElse System.Windows.Forms.Control.ModifierKeys <> System.Windows.Forms.Keys.None Then
Return
End If
Dim Str1 As String = ""
Vars("SysUpdateAggregate") = False
With RibbonTabs("Other").Groups("Aggregate")
With CType(.Items("Aggregate"), RibbonMenu.ToggleButton)
If .Pressed = False Then
Return
End If
End With
If CType(.Items("Count"), RibbonMenu.CheckBox).Checked Then
Str1 = Str1 & "计数:" & t.Aggregate(AggregateEnum.Count, t.TopRow, t.LeftCol, t.BottomRow, t.RightCol) & " "
End If
If CType(.Items("Sum"), RibbonMenu.CheckBox).Checked Then
Str1 = Str1 & "累计:" & t.Aggregate(AggregateEnum.Sum, t.TopRow, t.LeftCol, t.BottomRow, t.RightCol) & " "
End If
If CType(.Items("Average"), RibbonMenu.CheckBox).Checked Then
Str1 = Str1 & "平均:" & t.Aggregate(AggregateEnum.Average, t.TopRow, t.LeftCol, t.BottomRow, t.RightCol) & " "
End If
If CType(.Items("Max"), RibbonMenu.CheckBox).Checked Then
Str1 = Str1 & "最大:" & t.Aggregate(AggregateEnum.Max, t.TopRow, t.LeftCol, t.BottomRow, t.RightCol) & " "
End If
If CType(.Items("Min"), RibbonMenu.CheckBox).Checked Then
Str1 = Str1 & "最小:" & t.Aggregate(AggregateEnum.Min, t.TopRow, t.LeftCol, t.BottomRow, t.RightCol) & " "
End If
With CType(.Items("Other"), RibbonMenu.MenuButton)
If CType(.Items("Std"), RibbonMenu.ToggleButton).Pressed Then
Str1 = Str1 & "标准差:" & t.Aggregate(AggregateEnum.Std, t.TopRow, t.LeftCol, t.BottomRow, t.RightCol) & " "
End If
If CType(.Items("StdPop"), RibbonMenu.ToggleButton).Pressed Then
Str1 = Str1 & "总体标准差:" & t.Aggregate(AggregateEnum.StdPop, t.TopRow, t.LeftCol, t.BottomRow, t.RightCol) & " "
End If
If CType(.Items("Var"), RibbonMenu.ToggleButton).Pressed Then
Str1 = Str1 & "方差:" & t.Aggregate(AggregateEnum.Var, t.TopRow, t.LeftCol, t.BottomRow, t.RightCol) & " "
End If
If CType(.Items("VarPop"), RibbonMenu.ToggleButton).Pressed Then
Str1 = Str1 & "总体方差:" & t.Aggregate(AggregateEnum.VarPop, t.TopRow, t.LeftCol, t.BottomRow, t.RightCol) & " "
End If
End With
End With
RibbonMenu.StatusBar.Message3 = Str1
End If
我通过菜单模板重置了“System.foxrb”菜单,还是一样的错误,但是新建一个新项目,重置“System.foxrb”菜单模板,又不会报错,真不知怎么回事了,没升级之前好好的,郁闷了。
现在只能删除这段代码,就不报这个错,但是这个功能很实用,要怎么找出这个问题产生的原因呢?