开发者

Changing Printer settings in vb.net

开发者 https://www.devze.com 2023-02-03 19:20 出处:网络
I am making an application that prints records and I want to set the paper height dynamically. My problem is how to change the settings of the printer programmatically in 开发者_如何学编程VB.Net.

I am making an application that prints records and I want to set the paper height dynamically. My problem is how to change the settings of the printer programmatically in 开发者_如何学编程VB.Net.

Somebody told me that it could be done by going to Device and Printers, select the printer and setting it with the desired height. However, can I do this programmatically?


You can set the paper size dynamically in your code within the system.drawing.printing.papersize constructor.

  Dim PaperHeightInt As New Integer
  Dim PaperSize As Drawing.Printing.PaperSize
  PaperSize.Height = PaperHeightInt
0

精彩评论

暂无评论...
验证码 换一张
取 消