以文本方式查看主题 - Foxtable(狐表) (http://foxtable.net/bbs/index.asp) -- 专家坐堂 (http://foxtable.net/bbs/list.asp?boardid=2) ---- 窗口打印按钮出错 (http://foxtable.net/bbs/dispbbs.asp?boardid=2&id=177608) |
-- 作者:18640633955 -- 发布时间:2022/5/28 9:41:00 -- 窗口打印按钮出错 打印按钮代码: Dim tb As WinForm.TabControl = e.Form.Controls("开票") Dim pg As WinForm.TabPage = tb.SelectedPage Dim doc As PrintDoc = e.Form.GernatePrintDoc(pg) doc.Preview() 点击打印后出下面报错: .NET Framework 版本:4.0.30319.42000 Foxtable 版本:2022.1.30.2 错误所在事件:窗口,开票,Button5,Click 详细错误信息: 未将对象引用设置到对象的实例。
|
-- 作者:有点蓝 -- 发布时间:2022/5/28 9:46:00 -- 调试 Dim tb As WinForm.TabControl = e.Form.Controls("开piao") msgbox(tb is nothing) Dim pg As WinForm.TabPage = tb.SelectedPage msgbox(pg is nothing) Dim doc As PrintDoc = e.Form.GernatePrintDoc(pg) msgbox(doc is nothing) doc.Preview() msgbox(1) |