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
精彩评论