winform打印,如何在预览后打印时不再出现选择打印提示框,直接打印 winform打印,如何在预览后打印时不再出现选择打印提示框,直接打印 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 rpt_Quote1.PrintToPrinter(1,true,1,99999); 不出现吧,你用PrintDialog控件了吧?private void button1_Click(object sender, System.EventArgs e){ printPreviewDialog1.Document = printDocument1; printPreviewDialog1.ShowDialog();}private void printDocument1_PrintPage(object sender, System.Drawing.Printing.PrintPageEventArgs e){ // print}没出现呀? rpt_Quote1.PrintToPrinter(1,true,1,99999);他还是出呀,是直接打了,但无法阻止提示框出现 MIS金质打印通,打印时不要出现打印提示框,直接打印 请修改MisGoldPrinter.cs源码:www.webmis.com.cn/// <summary>/// 打印或显示设置对话框确定后打印。/// </summary>public System.Drawing.Printing.PrinterSettings PrintSetup(){ this.mCurrentPageIndex = 1; this.mCurrentRowIndex = 0; PrinterPageSetting printerPageSetting; printerPageSetting = new PrinterPageSetting(mPrintDocument); printerPageSetting.PrintPage += new PrintPageDelegate(this.PrintPageEventHandler); return printerPageSetting.ShowPrintSetupDialog(); }/// <summary>/// 打印或显示设置对话框确定后打印。/// </summary>public void Print(){ //直接打印 this.mCurrentPageIndex = 1; this.mCurrentRowIndex = 0; this.mPrintDocument.PrintPage+=new System.Drawing.Printing.PrintPageEventHandler(PrintPageEventHandler); try { this.mPrintDocument.Print(); } catch(Exception ex) { //Console.WriteLine(ex.Message); System.Windows.Forms.MessageBox.Show("打印机错误!\n","MIS金质打印通 www.webmis.com.cn"); }} 请教关于 vs 2008 的布局问题 .net 本机不同应用程序间通信 C#RichTextBox Find \n 快速排序 非递归算法~~~ exec master..xp_cmdshell 'bcp.....' 在C# Winform程序中怎样用?????? 怎么把图象的背景Background,转为BitmapImage? 在使用remoting开发时,遇到释放事件的问题。 怎么把这段js转换为c#呢,请教高手留步1分钟 如何能够连接到处于内网的数据库服务器 ASP.net访问remoting无限等待的问题 调用dll出现的奇怪问题!奇怪 启动窗体
private void button1_Click(object sender, System.EventArgs e)
{
printPreviewDialog1.Document = printDocument1;
printPreviewDialog1.ShowDialog();
}private void printDocument1_PrintPage(object sender, System.Drawing.Printing.PrintPageEventArgs e)
{
// print
}
没出现呀?
他还是出呀,是直接打了,但无法阻止提示框出现
源码:www.webmis.com.cn/// <summary>
/// 打印或显示设置对话框确定后打印。
/// </summary>
public System.Drawing.Printing.PrinterSettings PrintSetup()
{
this.mCurrentPageIndex = 1;
this.mCurrentRowIndex = 0; PrinterPageSetting printerPageSetting;
printerPageSetting = new PrinterPageSetting(mPrintDocument);
printerPageSetting.PrintPage += new PrintPageDelegate(this.PrintPageEventHandler); return printerPageSetting.ShowPrintSetupDialog();
}/// <summary>
/// 打印或显示设置对话框确定后打印。
/// </summary>
public void Print()
{
//直接打印
this.mCurrentPageIndex = 1;
this.mCurrentRowIndex = 0; this.mPrintDocument.PrintPage+=new System.Drawing.Printing.PrintPageEventHandler(PrintPageEventHandler); try
{
this.mPrintDocument.Print();
}
catch(Exception ex)
{
//Console.WriteLine(ex.Message);
System.Windows.Forms.MessageBox.Show("打印机错误!\n","MIS金质打印通 www.webmis.com.cn");
}
}