返回首页

ssyuvaraja

回答

评论会员:游客 时间:2012/02/07
查看下面的代码:codeprelang="c#"spanclass="code-keyword"protected/spanspanclass="code-keyword"void/spanbtnPrint_Click(spanclass="code-keyword"object/spansender,EventArgse){ PrintDocumentpd=spanclass="code-keyword"new/spanPrintDocument(); pd.PrintPage+=spanclass="code-keyword"new/spanPrintPageEventHandler(GetImage); pd.Print();}spanclass="code-keyword"void/spanGetImage(spanclass="code-keyword"object/spano,PrintPageEventArgse){ spanclass="code-keyword"int/spanx=SystemInformation.WorkingArea.X; spanclass="code-keyword"int/spany=SystemInformation.WorkingArea.Y; spanclass="code-keyword"int/spanwidth=spanclass="code-keyword"this/span.Width; spanclass="code-keyword"int/spanheight=spanclass="code-keyword"this/span.Height; Rectanglebounds=spanclass="code-keyword"new/spanRectangle(x,y,width,height); Bitmapimg=spanclass="code-keyword"new/spanBitmap(width,height); spanclass="code-keyword"this/span.DrawToBitmap(img,bounds); Pointp=spanclass="code-keyword"new/spanPoint(spanclass="code-digit"100/span,spanclass="code-digit"100/span); e.Graphics.DrawImage(img,p);}/pre/code
纳西尔万@ hmood:如果你想打印整个表单,那么你可以使用从Visual工具箱基本PowerPack进行的PrintForm控制

同样的{A}链接
评论会员:Prafulla混得 时间:2012/02/07
尝试
{A2}]
评论会员:游客 时间:2012/02/07
RaviRanjankr:试试这个编辑:现在,我看你再次提问,我不知道这是你想要的(我不是想清楚)。{S0的}但我会离开这里呢
LanFanNinja
评论会员:游客 时间:2012/02/07
。有许多知识在互联网上提供充分的资源,可以学习的网站,这是非常有用的学习网络技术从there.This{A3的}]