怎么实现打印功能? <INPUT onclick="javascript:print()" type="button" value="【打印】"> 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 private void printDocument1_PrintPage(object sender, System.Drawing.Printing.PrintPageEventArgs e) { string sContent = "Test Print"; Font printTitleFont= new Font("Arial",8,FontStyle.Regular); StringFormat sLeft=new StringFormat(); sLeft.Alignment=StringAlignment.Near; e.Graphics.DrawString(sContent,printTitleFont,Brushes.Black,new RectangleF(e.MarginBounds.Left, e.MarginBounds.Top, e.MarginBounds.Width, e.MarginBounds.Height),sLeft); }調用printDocument1.Print(); iis掛機 sql 语句问题 DataGridView如何才能默认不选中任何单元格呢? 关于一个截取字符串问题 有个关于类成员属性的问题,一定要帮忙啊! WinForm下如何实现对Web虚拟目录中的文件的下载 报表怪问题,急救 面试官的问题: Collection和Collections这两个概念在C#里面有什么不同? List 转DataTable 一个万分紧急的问题 一個簡單的問題,連接DB的問題?我要指向其他Server 窗口加载问题
{
string sContent = "Test Print";
Font printTitleFont= new Font("Arial",8,FontStyle.Regular);
StringFormat sLeft=new StringFormat();
sLeft.Alignment=StringAlignment.Near;
e.Graphics.DrawString(sContent,printTitleFont,Brushes.Black,new RectangleF(e.MarginBounds.Left, e.MarginBounds.Top, e.MarginBounds.Width, e.MarginBounds.Height),sLeft);
}調用
printDocument1.Print();