0

Please Help me i'm ready make a sample form that have main panel and some control on it and have one picturebox and i want to make a label on picturebox but when save image show label in behind picturebox My Form Sample Design

Save Image Result

My Save Button Code

Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
    Try


        Dim b As New Bitmap(Panel1.DisplayRectangle.Width, Panel1.DisplayRectangle.Height)
        Panel1.DrawToBitmap(b, Panel1.ClientRectangle)



        b.Save("D:\TestFile.jpg")
        'Dim pd As New System.Drawing.Printing.PrintDocument
        'AddHandler pd.PrintPage, AddressOf OnPrintPage



        'pd.Print()

    Catch ex As Exception
        MsgBox("Printing Problem" & Chr(13) & ex.Message, MsgBoxStyle.Exclamation)
    End Try
End Sub
ORN SIVEY
  • 7
  • 2

1 Answers1

0

Use the method shown here: how to print hidden and visible content on a panel.

(answered by @Jimi in the comments)

JorisJ1
  • 922
  • 2
  • 12
  • 22