纵向好打:
string str=@"string str test";
StringFormat sf=new StringFormat(StringFormatFlags.1|StringFormateFlags.2);
//
注意:
StringFormat 构造函数的参数设为枚举StringFormatFlags的第一与第二个值的“或";
e.Graphics.DrawString(font,brush,new Point(x,y),sf);
至于分页:
重写PrintDocument的 PrintPage 事件:
eg:
StringFormat sf1;//横向打印
StringFormat sf2;//纵向打印
int pageCurrnt=0;
protected override void OnPrintPage(PrintPageEventArgs e)
{
base.OnPrintPage(e);
pageCurrent++;
if(pageCurrent%2==0)
e.Graphics.DrawString(,,,,,sf2)
else
e.Graphics.DrawString(.....sf1);
int pageCurrent++;
if
}
string str=@"string str test";
StringFormat sf=new StringFormat(StringFormatFlags.1|StringFormateFlags.2);
//
注意:
StringFormat 构造函数的参数设为枚举StringFormatFlags的第一与第二个值的“或";
e.Graphics.DrawString(font,brush,new Point(x,y),sf);
至于分页:
重写PrintDocument的 PrintPage 事件:
eg:
StringFormat sf1;//横向打印
StringFormat sf2;//纵向打印
int pageCurrnt=0;
protected override void OnPrintPage(PrintPageEventArgs e)
{
base.OnPrintPage(e);
pageCurrent++;
if(pageCurrent%2==0)
e.Graphics.DrawString(,,,,,sf2)
else
e.Graphics.DrawString(.....sf1);
int pageCurrent++;
if
}
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货