Hello!. So we have a PDF that I am converting to a VB.net form in our project so I can pull in some of the data from SQL server to save time for our employees that do these.
The goal is that the employee will be prompted to enter an ORD# which will then auto fill most of the fields. They will proceed with making the proper adjustments. When they click the print button, it will set all textboxes to have no border so it looks nice, and then print. However, some textboxes, and a panel of the form is not displaying in print preview.
The Form: Screenshot - 934c4036b284e479dcaf601ce53f0e12 - Gyazo
Print Preview:Screenshot - 856ae08f27134650e90ff4c08368b3f7 - Gyazo
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
PrintForm1.PrinterSettings.DefaultPageSettings.Margins.Left = 5
PrintForm1.PrinterSettings.DefaultPageSettings.Margins.Right = 5
PrintForm1.PrinterSettings.DefaultPageSettings.Margins.Bottom = 5
PrintForm1.PrinterSettings.DefaultPageSettings.Margins.Top = 5
Me.PrintForm1.PrintAction = Printing.PrintAction.PrintToPreview
EDIT: So when I hide the labels with the underlines, the text boxes show. I set those labels to the back and textboxes to front but it still prints with them in the back... I tried setting the textbox to the front under the button_click and still nothing. Its weird that other textboxes and and panels containing the checkboxes are fine further down.... I thought maybe it was the viewable part of the form but when I made the form bigger, it looks the same.
What I have tried:
I have tried re adding the controls and adding back. I verified the missing controls are to the front.
When I remove the bold text from the from the bottom code line, the controls show but of course is not doing the whole scrollable form.