Hi,

I am trying to take a screenshot of the part of a windows form   -
Me.SplitContainer1.Panel2- save it to a bitmap, print and it is not
working . Any suggestions how to make it work and what print comment
to print it. Also, do you know if the bitmap is save somewhere on the
harddrive or is it in memory.

Here are my codes

Dim bmpImg As Bitmap = New Bitmap(Me.SplitContainer1.Panel2.Width,
Me.SplitContainer1.Panel2.Height)

        Me.SplitContainer1.Panel2.DrawToBitmap(bmpImg, New Rectangle
(0, 0, Me.SplitContainer1.Panel2.Width,
Me.SplitContainer1.Panel2.Height))

        bmpImg.Save("SplitPanel.jpg",
System.Drawing.Imaging.ImageFormat.Jpeg)

        PrintDocument1.Print()

Thinks for your help.

Reply via email to