使用了无效参数,是什么原因?
//打印预览
public void printerView(Panel mainpanel,PictureBox[] mypb,bool rst)
{
this.currentPage = 1;
getTableValue(mainpanel,mypb);
try
{
PrintDocument pd = new PrintDocument();
pd.QueryPageSettings+= new QueryPageSettingsEventHandler(this.QueryPageSettingsEventHandler );
pd.PrintPage += new PrintPageEventHandler( this.PrintPageEventHandler);
Bitmap img=new Bitmap(mainpanel.AutoScrollMinSize.Width,mainpanel.AutoScrollMinSize.Height);
Graphics imgG=Graphics.FromImage(img);
imgG.Clear(mainpanel.BackColor);
if (rst)
{
printerp_Paint(mainpanel,new PaintEventArgs(imgG,mainpanel.ClientRectangle));
}
else
{
printer_Paint(mainpanel,new PaintEventArgs(imgG,mainpanel.ClientRectangle));
}
if ( this.storedPageSettings != null )
pd.DefaultPageSettings = this.storedPageSettings ;
PrintPreviewDialog dlg = new PrintPreviewDialog();
dlg.Document = pd;
dlg.ShowDialog();
}
运行到Bitmap img=new Bitmap(mainpanel.AutoScrollMinSize.Width,mainpanel.AutoScrollMinSize.Height);出错,是何原因?
...全文
相关推荐
基于命令行执行带参数的php脚本并取得参数的方法
命令行方式不涉及HTTP协议,因此GET和POST方法传递的参数在这种情况下无效,尝试使用URL参数会报错,因为命令行不会解析URL。例如,尝试执行`php test.php?
Win32 API的WriteFile导致成功打开邮筒的错误编号6(无效句柄)
然而,当我们在使用`WriteFile`时遇到错误6,即“无效句柄”(ERROR_INVALID_HANDLE),这通常表明我们提供的文件句柄或者I/O操作参数有误。
Excel中的常见错误值全解析[会计实务-会计实操].doc
** 错误 这个错误表示公式或函数使用了无效的数值。可能的原因有: - 在需要数字参数的函数中使用了不合适的参数。 - 迭代函数(如IRR或RATE)无法找到结果。
Excel2021中出现常见错误值怎么办?.docx
可能的原因包括缺少数据,查找函数参数错误,未排序的表中使用查找函数,数组公式参数与区域大小不符,缺少必需参数,使用不可用的自定义函数,或宏返回#N/A。5. #NAME?
c++中临时变量不能作为非const的引用参数的方法
因此,C++编译器为了防止潜在的错误和不确定性,规定了这个语义限制,不允许将临时变量作为非const引用参数。总结来说,C++中临时变量不能作为非const引用参数的原因在于:1.


