I have a very simple from, it has a button and a 2 column by 1 row tablelayoutpanel and a printform. When the form loads, a query that the user generated in the previous form pulls images from the database. These images are placed into picture boxes and the picture boxes are then added to a cell in the tablelayoutpanel. New rows are generated as needed once the 2 cells on the current row are filled with an image.
Depending on the user's query the table could have only two images or a be table with dozens. Whatever the case may be, I would like to be able to print out the results when the print button is pressed.
I'm fairly new to vb so I don't have much experience with printing. I've tried using the following code:
This gives me a printpreview of what the outcome would look like. However, this preview only contains one page! From what I've been able to find out online, PrintForm may not be the best option for this because it is mostly intended to print a screenshot of the form.
How can I print the entire TableLayoutPanel on multiple pages if needed? Sorry if this has a really simple solutions or has been answered before, I've been scouring the internet for two days non-stop trying to find a solution but have yet to find anything useable. Ideally I would like to print 2 columns and 3 rows per page (so six images).
Please let me know if you guys need anymore info, or if I have to describe my problem better. Thanks in advance!!
Depending on the user's query the table could have only two images or a be table with dozens. Whatever the case may be, I would like to be able to print out the results when the print button is pressed.
I'm fairly new to vb so I don't have much experience with printing. I've tried using the following code:
Code:
Private Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles Button1.Click
PrintForm1.PrintAction = PrintAction.PrintToPreview
PrintForm1.Print(Me, PowerPacks.Printing.PrintForm.PrintOption.Scrollable)
End Sub
How can I print the entire TableLayoutPanel on multiple pages if needed? Sorry if this has a really simple solutions or has been answered before, I've been scouring the internet for two days non-stop trying to find a solution but have yet to find anything useable. Ideally I would like to print 2 columns and 3 rows per page (so six images).
Please let me know if you guys need anymore info, or if I have to describe my problem better. Thanks in advance!!