国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 開發(fā) > 綜合 > 正文

收藏Code: Printing a DataGrid (Visual C#)

2024-07-21 02:19:07
字體:
供稿:網(wǎng)友

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/
相關(guān)文章
what's 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的錯(cuò)誤信息語言種類
.net里的哈希表和串行化
發(fā)表評論 共有條評論
用戶名: 密碼:
驗(yàn)證碼: 匿名發(fā)表
主站蜘蛛池模板: 安阳市| 宾阳县| 梅河口市| 偃师市| 巨野县| 应城市| 灵寿县| 岳西县| 罗平县| 广西| 蚌埠市| 广河县| 崇信县| 宁安市| 漯河市| 抚州市| 九台市| 东辽县| 三江| 利津县| 东光县| 乡城县| 辉南县| 湘阴县| 洛隆县| 漠河县| 滕州市| 潜江市| 东兴市| 盘山县| 夏邑县| 宁远县| 四会市| 牟定县| 高雄市| 隆林| 青浦区| 东丰县| 丹棱县| 枣强县| 尤溪县|