Hi,
I didn't found the way to get from a selected printer a list with all their paper bins or paper sizes. Is this feature planned ?
Thanks,
Yann.
Paperbin/Papersize list from a selected printer
Re: Paperbin/Papersize list from a selected printer
Hi Yann,
.NET framework already offers a lot of functions to do that.
Here is a vb.net sample: Start a new project, add button1 & Button2.
Button1 will list all paper bin & Button 2 will list all paper sizes:
Hope this helps.
Kind regards,
Loïc
.NET framework already offers a lot of functions to do that.
Here is a vb.net sample: Start a new project, add button1 & Button2.
Button1 will list all paper bin & Button 2 will list all paper sizes:
Code: Select all
Public Class Form1
Private prn As New Printing.PrintDocument
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
For n As Integer = 0 To prn.DefaultPageSettings.PrinterSettings.PaperSources.Count - 1
MsgBox(prn.DefaultPageSettings.PrinterSettings.PaperSources(n).ToString)
Next
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
For n As Integer = 0 To prn.DefaultPageSettings.PrinterSettings.PaperSizes.Count - 1
MsgBox(prn.DefaultPageSettings.PrinterSettings.PaperSizes(n).ToString)
Next
End Sub
End Class
Kind regards,
Loïc
Who is online
Users browsing this forum: No registered users and 1 guest