VB.NET:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Me.PrintForm1.PrintAction = (Printing.PrintAction.PrintToPreview)
Me.PrintForm1.Print(Me, PowerPacks.Printing.PrintForm.PrintOption.ClientAreaOnly)
End Sub
I want to print just the chart on a form and present the user with page setup option so they can switch to landscape printing and select whatever printer they desire.
No need to explain the code I started with...will be obvious to you guys....needed to start somewhere.
Have added Printform1, Pagesetupdialog, printpreviewdialog to form
Found some code for document printing but it doesn't mix with the powerpacks printform .... or so I can't get it to anyway. That code is below..
VB.NET:
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
Dim printdoc As New PrintDocument
PageSetupDialog1.Document = printdoc
PrintPreviewDialog1.Document = printdoc
PageSetupDialog1.ShowDialog()
PrintPreviewDialog1.ShowDialog()
PrintPreviewControl1.Document = printdoc
End Sub