【发布时间】:2017-09-06 16:16:07
【问题描述】:
我很好奇你是否可以使用 printDialog 打印无线网络?我做了一些研究,但找不到任何与此问题相关的文章。我正在使用 Windows 7。
这是我的代码是否有帮助:
public void DVPrintDocument_PrintPage(object sender, System.Drawing.Printing.PrintPageEventArgs e)
{
Bitmap r3tsLogo = Properties.Resources.rt3slogo;
System.Drawing.Image image1 = r3tsLogo; //image 1 is r3tsLogo
e.Graphics.DrawImage(image1, 350, 0, image1.Width, image1.Height);
//change the new point to put text on different part of paper.
e.Graphics.DrawString("Address:", new System.Drawing.Font("Impact", 12, FontStyle.Regular), Brushes.Black, new Point(300, 90));
//This line of code connects to Code line 151
e.Graphics.DrawString("North Building Room 61", new System.Drawing.Font("Arial", 10, FontStyle.Regular), Brushes.Black, new Point(370, 94));
}
【问题讨论】:
-
这是一个奇怪的问题。为什么您不能能够无线打印?打印对话框并不关心您拥有什么类型的打印机。您是否尝试过并遇到过问题?这段代码 sn -p 好像和打印没什么关系……
-
没有文档,因为您的问题毫无意义。打印对话框与实际执行打印的方式无关,这是答案中指定的驱动程序的责任。如果您无法安装打印机驱动程序,那么您将无法从该机器上的任何应用程序进行打印。
-
您看到系统中的打印机了吗?然后就可以使用了。
标签: c# winforms print-preview printdialog