I need to print on one page the text that resides in several
panels....
But all of the printer examples I've found show printing text from
only one control such as the Richtextbox below.
So to ask again: How can I print to one page the text shown in several
panels - (Note that I know that there is plenty of room for the data
on one page.)
panels....
But all of the printer examples I've found show printing text from
only one control such as the Richtextbox below.
VB.NET:
[COLOR=magenta]'For example when printing, we can do it something like this:[/COLOR]
[COLOR=magenta]'The sub belows is the menu option to start the printing[/COLOR]
Private Sub MenuItem2_Click(ByVal sender As System.Object, ByVal e As _
System.EventArgs) Handles MenuItem2.Click
If PrintDialog1.ShowDialog = DialogResult.OK Then
'showDialog method makes the dialog box visible at run time
[COLOR=blue]PrintDocument1.Print()[/COLOR]
End If
End Sub
[COLOR=magenta]'The sub below does the printing [/COLOR]
Private Sub [COLOR=blue]PrintDocument1_PrintPage[/COLOR](ByVal sender As Object, ByVal e As_
System.Drawing.Printing.PrintPageEventArgs) Handles PrintDocument1.PrintPage
...
...
e.Graphics.MeasureString(Mid([COLOR=red]RichTextBox1.Text[/COLOR], intCurrentChar + 1), font,_
New SizeF(PrintAreaWidth, PrintAreaHeight), fmt, intCharsFitted, intLinesFilled)
e.Graphics.DrawString(Mid([COLOR=red]RichTextBox1.Text[/COLOR], intCurrentChar + 1), font,_
Brushes.Black, rectPrintingArea, fmt)
...
end sub
So to ask again: How can I print to one page the text shown in several
panels - (Note that I know that there is plenty of room for the data
on one page.)
Last edited: