问题描述
亲爱的团队,
我在printpreview对话框中有一个printdocument页面,这是vb.net中的mdi子窗体。
当我关闭mdiform(mdiparent)时
每次调用printdocuments beginprint / printpage事件时,每次调用mdi close方法时,我们都可以停止这种行为。
在printdocument构造函数中我通过了菜单上的Mdi_Form
单击mdi表单我调用构造函数和构造函数代码如下
Dim PrintDialog1作为新的PrintPreviewDialog
PrintDialog1.Document = PrintDocument'PrintDialog与PrintDocument相关联。
PrintDialog1.mdiparent = mdiform
PrintDialog1.Show()
和打印所需的所有代码都在
Print_Doc ---- Begin_print和Print_Page事件
工作正常,但当我关闭mdi表单时,它再次只调用这些事件
Print_Doc ---- Begin_print和Print_Page活动
谢谢
Sukhen Dass
Dear Team,
I have a printdocument page in printpreview dialog and which is a mdi child form in vb.net.
when i close the mdiform(mdiparent) every time it is calling the printdocuments beginprint/printpage event again and every time the mdi close method is called,can we stop doing this behavior.
in printdocument constructor i passed the Mdi_Form
on menu click in mdi form i called the constructor and constructor code is below
Dim PrintDialog1 as new PrintPreviewDialog
PrintDialog1.Document = PrintDocument 'PrintDialog associate with PrintDocument.
PrintDialog1.mdiparent=mdiform
PrintDialog1.Show()
and all the required codes for printing is in
Print_Doc----Begin_print and Print_Page event
its working fine but when i closed the mdi form it again call only these events
Print_Doc----Begin_print and Print_Page event
Thanks
Sukhen Dass
这篇关于打印预览对话框和Mdi表单的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!