John, sorry to dig up an old thread print a form vb.net , but I have a question about the module you posted. How can I use the module you provided, but print an entire single page scrollable form without the form border?
I am unhappy with my current code which works, but doesnt offer the printer selection, it also prints off center and cuts off the bottom of the form on XP machines, but prints perfect on my Vista machine. Moral of the story is, I think your option is much better if I could print a scrollable form.
This is the code for the print menu object from main form, the form actually being printed is more of a preview window with a menubar across the top.
I am unhappy with my current code which works, but doesnt offer the printer selection, it also prints off center and cuts off the bottom of the form on XP machines, but prints perfect on my Vista machine. Moral of the story is, I think your option is much better if I could print a scrollable form.
This is the code for the print menu object from main form, the form actually being printed is more of a preview window with a menubar across the top.
VB.NET:
Private Sub PrintCurrentFormToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles PrintCurrentFormToolStripMenuItem.Click
Form3.MenuStrip1.Visible = False
Form3.PrintForm2.PrinterSettings.PrinterResolutions.Equals(1200)
Form3.PrintForm2.Print(Form3, PowerPacks.Printing.PrintForm.PrintOption.Scrollable)
Form3.MenuStrip1.Visible = True
End Sub
Last edited by a moderator: