Hi guys,
I need coding help in printing contents that are inside the groupBox only. I have a form with two groupBoxes, and would like to print contents on only 1 groupBox.
Thanks.
Hi guys,
I need coding help in printing contents that are inside the groupBox only. I have a form with two groupBoxes, and would like to print contents on only 1 groupBox.
Thanks.
You need to tell which controls are in your groupbox and what you want to print,
text, pictures buttons, button.names etc.
I need to print a picture, labels and textboxes. I need this contorls to be sent to a printer when i click the print button.
What have tried sofar? You got some code?
Below is my code for the print button, the problem is that when i click on the print button, all contents on the form prints.
------------------------------------------------------------
Private Sub btnPrintSalarySlp_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnPrintSalarySlp.Click
-------------------------------------------------------------------
PrintDialog1.Document = PrintDocument1 'PrintDialog associate with PrintDocument.
If PrintDialog1.ShowDialog() = DialogResult.OK Then
PrintDocument1.Print()
End If
End Sub
This link might help to solve the problem. And yes, there is a bit more involved printing selection in a form.
https://social.msdn.microsoft.com/Forums/vstudio/en-US/adfda3b9-7dbb-430b-96ca-28dd7f543bea/how-to-print-a-group-box-content-only-in-vb?forum=vbgeneral
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.