Printform excluding labels

Turbols1

Member
Joined
Jan 25, 2010
Messages
13
Programming Experience
1-3
Hello all, having some trouble with printform excluding some (but not all?) of my labels when printing. I have a picturebox on a scallable form, the picture is a bmp converted from a pdf with labels over the top so as to "fill out" the form. When I click print, I get the preview, but it excludes most of my labels? Any ideas?

Here is the code for the print button
VB.NET:
Private Sub PrintCurrentFormToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles PrintCurrentFormToolStripMenuItem.Click
        Form3.Show()
        Form3.Focus()
        Form3.MenuStrip1.Visible = False
        Form3.PrintForm1.PrinterSettings.PrinterResolutions.Equals(1200)
        Form3.PrintForm1.Print(Form3, PowerPacks.Printing.PrintForm.PrintOption.Scrollable)
        Form3.MenuStrip1.Visible = True
    End Sub

Thanks in advance!
 
Okay, I figured it out. All labels or objects over the top of the picture box must have the following entered into the form_load.

The Color.Transparent code is not required, but makes the label background invisible.

FYI, I converted a pdf to a bitmap in Photoshop, then loaded it into a picturebox with labels over each input field to simulate that the picture is simply a filled out pdf. It prints and works great.

VB.NET:
Label1.Parent = PictureBox1
Label1.BackColor = Color.Transparent
 
Back
Top