Answer 4
Here's a print method I wrote to print monthly time sheets (in Landscape mode) where I work. I wrote it with VB Express 2008 as a WPF application.
Private Sub PrintTheTimeSheet()
Dim d As New PrintDialog
Dim pageMargin As Integer = 0
Dim pageSize As New Size(d.PrintableAreaWidth - pageMargin * 2, d.PrintableAreaHeight - 30)
winTimeSheet.Measure(pageSize)
winTimeSheet.Arrange(New Rect(pageMargin, pageMargin, pageSize.Height, pageSize.Width))
d.PrintQueue = LocalPrintServer.GetDefaultPrintQueue
d.PrintTicket.PageOrientation = PageOrientation.Landscape
d.PrintVisual(winTimeSheet, "Time Sheet")
Me.Close()
End Sub
It prints to the Default printer (in this case the form named winTimeSheet is printed). You may want to play with the settings, margins etc., these work with my printer, but you should be able to adapt it to your needs.
You also might want to open the print dialog and print from there. If you go to online help in vb and type in the keywords you can find out how to use the various members of the different classes and find out which references you need to add and import
to make everything work.
Hope this helps.
Geo