--
If e.Control = True Then
Select Case e.KeyCode
Case keys.F8
Forms("数据记录窗口").Open
Dim tbl As Table = e.Table
Dim rw As Row = tbl.Current
Dim fm数据记录窗口 As WinForm.Form = Forms("数据记录窗口")
Dim rcd As winform.RecordGrid = Forms("数据录入").CreateControl("rcd_", ControlTypeEnum.RecordGrid)
rcd.Table = e.Table
Dim fnt As New Font("黑体", 12)
rcd.Font = fnt
rcd.Build() \'生成记录窗口
rcd.SetBounds(10, 10, 600, 1500) \'指定位置和尺寸
Forms("数据记录窗口").AddControl(rcd)
Case Keys.F9
End Select
End If
在全局表事件中写了上面的代码,在窗口中显示当前表的记录窗口,运行没有问题,但在这个窗口里点击鼠标时,会弹出错误