I am looking to print the contents of a form that is on the screen, eventually I will want to print part of the form but not all of it, but that is for another day.
So far I have the form printing using this code
Dim x As Integer, y As Integer
PrintForm1.Form = Me
PrintForm1.PrinterSettings.DefaultPageSettings.Landscape = True
x = PrintForm1.PrinterSettings.DefaultPageSettings.PrintableArea.Width
y = PrintForm1.PrinterSettings.DefaultPageSettings.PrintableArea.Height
MsgBox("Printer area: " & vbCrLf & y & " x " & x & vbCrLf & vbCrLf & "Screen area: " & vbCrLf & Me.Width & " x " & Me.Height, , "Printable Area")
PrintForm1.PrintAction = Printing.PrintAction.PrintToPreview
You can see from my code that I have dropped in a message box to tell me what the resolution of the paper is and what the size of my form is (Printer area is 1113 x 800 and Screen area is 1366 x 768). You will also see I have set it to print preview rather than print, purely to save paper during testing.
My goal is to resize the image of the form to the size of a landscape A4 sheet of paper (which in this case appears to be 1113x800) .
Obviously I cannot simply resize the form, as that would lose some information. I want the entire contents of my form to exactly fit the single sheet of A4.
An hour of googling has got me nowhere and MSDN doesn't seem to be of any use either. Any help is much appreciated!