I'm developing an application in vb.net. The output form is shown below. It has a PRINT button to print the components in the form. I mean it should print the entire form when I click the print button. I wrote the following code on the PRINT button
PrintDialog1.Document = PrintDocument1 Dim result As DialogResult = PrintDialog1.ShowDialog If (result = DialogResult.OK) Then PrintDocument1.Print() End If
But the problem is it doesn't print the form. Instead, it prints a blank page.
Can someone say what is the mistake in my code, and how to print the page like the above image. Thanks in advance