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

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.