如何在c#中垂直打印第一行 [英] how to print vertically first row in c#

查看:82
本文介绍了如何在c#中垂直打印第一行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在datagridview中有动态数据,包括标题,即第一行和打印按钮。我创建了一个Windows 2005 visualstudio应用程序,用于在点阵打印机中打印该数据,但问题是如何以90度打印第一行。任何帮助将受到高度赞赏。从 itemname到total ,第一行应该以90度打印,以便我可以在点阵打印机中打印我的所有32列c#



itemname category ot accounts records ctot cathlab ccu 2ndfloor 3rdfloorward 4thfllorward 5thfloorward total

床单

fresh 1 1 1 1 1 4 4 4 7 5 29

使用5 5

谴责3 4 7

小计1 1 4 1 1 4 4 4 7 0 28



pillowcover

fresh 1 1 1 1 1 4 4 4 7 5 29

使用5 5

谴责3 4 7
小计1 1 4 1 1 4 4 4 7 14 28

I have my dynamic data in a datagridview including the headers i.e. first row and a print button. I have created a windows 2005 visualstudio application to print that data in dot-matrix printer but the problem is how to print the first row at 90 degree. any help will be highly appreciated. From itemname to total the first row should be print at 90 degree so that I can print all my 32 columns in dot-matrix printer in c#

itemname category ot accounts records ctot cathlab ccu 2ndfloor 3rdfloorward 4thfllorward 5thfloorward total
bedsheet
fresh 1 1 1 1 1 4 4 4 7 5 29
used 5 5
condemn 3 4 7
subtotal 1 1 4 1 1 4 4 4 7 0 28

pillowcover
fresh 1 1 1 1 1 4 4 4 7 5 29
used 5 5
condemn 3 4 7
subtotal 1 1 4 1 1 4 4 4 7 14 28

推荐答案

使用PrintDocument类:MSDN [ ^ ] an d你可以任何你想要的方式打印它,而不必给你的用户颈部疼痛......:笑:



该链接包含一个例子。
Use the PrintDocument class: MSDN[^] and you can print it any way you want, without having to give your users neck ache...:laugh:

The link includes an example.


这篇关于如何在c#中垂直打印第一行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆