1
好的,这是我的整个代码。现在... Detail_BeforePrint()
将首先被调用,并且xrPictureBox8_BeforePrint
秒。 现在我想拨打Detail_BeforePrint
e.Cancel = true;
里面的else
在xrPictureBox8_BeforePrint
事件。发送取消参数C#
private void Detail_BeforePrint(object sender, System.Drawing.Printing.PrintEventArgs e)
{
//here should e.Cancel = true be if it came from xrPictureBox_BeforePrint()
}
private void xrPictureBox8_BeforePrint(object sender, System.Drawing.Printing.PrintEventArgs e)
{
try
{
if (xrPictureBox8.ImageUrl.Length > 0) { }
else
{
Detail_BeforePrint(null,[call Cancel parameter]);
}
}
catch (Exception)
{
}
}
这个问题太模糊了 - 我现在读了3遍,我还不确定你需要什么帮助。你想要完成什么,以及你的问题到底是什么。还提供了一个代码示例。 – user1666620