Hello kind folks over here!
I'm taking a hiatus from developing a couple of databases to work a little with VB.Net. My problem is understanding how to send page settings to the printer bypassing the Page Settings dialog box. For my application there will be no need for anyone to change paper sizes, margins, etc etc etc... so why give them too many options, eh?
This code section is what I've been trying to use to send the paper size and layout, i.e. landscape to the printer, however it doesn't seem to do much towards making the printer listen when it talks...
[CODE=vbnet]
Private Sub PrintPageHandle r(ByVal sender As Object, ByVal e As Printing.PrintP ageEventArgs)
Try
Dim psz As New Printing.PaperS ize
psz.PaperName = Printing.PaperK ind.A4
e.PageSettings. PaperSize = psz
e.PageSettings. Landscape = True
Catch ex As Exception
MessageBox.Show (ex.Message)[/CODE]
Anyone able to point me in the right direction?
Regards,
Scott
I'm taking a hiatus from developing a couple of databases to work a little with VB.Net. My problem is understanding how to send page settings to the printer bypassing the Page Settings dialog box. For my application there will be no need for anyone to change paper sizes, margins, etc etc etc... so why give them too many options, eh?
This code section is what I've been trying to use to send the paper size and layout, i.e. landscape to the printer, however it doesn't seem to do much towards making the printer listen when it talks...
[CODE=vbnet]
Private Sub PrintPageHandle r(ByVal sender As Object, ByVal e As Printing.PrintP ageEventArgs)
Try
Dim psz As New Printing.PaperS ize
psz.PaperName = Printing.PaperK ind.A4
e.PageSettings. PaperSize = psz
e.PageSettings. Landscape = True
Catch ex As Exception
MessageBox.Show (ex.Message)[/CODE]
Anyone able to point me in the right direction?
Regards,
Scott
Comment