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.

Recommended Answers

You need to tell which controls are in your groupbox and what you want to print,
text, pictures buttons, button.names etc.

Jump to Post

What have tried sofar? You got some code?

Jump to Post

All 5 Replies

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 1.19 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.