欢迎光临
我们一直在努力

收藏Code: Printing a DataGrid (Visual C#)-.NET教程,C#语言

建站超值云服务器,限时71元/月

code: printing a datagrid (visual c#)

this example demonstrates printing a datagrid control.

example

private void printgrid_click(system.object sender, system.eventargs e)

printdocument1.print();

private void printdocument1_printpage(system.object sender, system.drawing.printing.printpageeventargs e)

painteventargs mypaintargs = new painteventargs(e.graphics, new rectangle(new point(0, 0), this.size));

this.invokepaint(datagrid1, mypaintargs);

compiling the code

this example requires:

a button control named printgrid with a click event handler.

a datagrid control named datagrid1.

a printdocument component named printdocument1 with a printpage event handler.

the example code replaces the existing event handlers.

robust programming

the following conditions may cause an exception:

you do not have permission to access the printer.

there is no printer installed.

security

in order to run this example, you must have permission to access the printer.

from:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cscon/html/vclrfcodeprintingdatagridvisualc.asp

作者blog:http://blog.csdn.net/ncowboy/

相关文章

whats new in the .net framework 2.0 beta

visual web developer 2005 express edition beta 1 manual setup instructions

implementing reverse proxy in squid

更改squid的错误信息语言种类

.net里的哈希表和串行化

赞(0)
版权申明:本站文章部分自网络,如有侵权,请联系:west999com@outlook.com 特别注意:本站所有转载文章言论不代表本站观点! 本站所提供的图片等素材,版权归原作者所有,如需使用,请与原作者联系。未经允许不得转载:IDC资讯中心 » 收藏Code: Printing a DataGrid (Visual C#)-.NET教程,C#语言
分享到: 更多 (0)

相关推荐

  • 暂无文章