Convert Form to a bitmap plz help

hawkseye

Active member
Joined
Dec 4, 2004
Messages
28
Programming Experience
Beginner
Is it possible to convert a form to bitmap. Actually i have a form on which different things( labels, grapg etc) are drawn at run time. So what i want is that when everything is drawn it is converted to a bitmap. i tried
myBmp = me.creategraphics
but it didnt work

plz help me
 

Joshdbr

Well-known member
Joined
Apr 7, 2011
Messages
211
Location
Montana, USA
Programming Experience
5-10
Try this:

Public Function GetFormImage() As Image
    Dim bmp As New Bitmap(Me.Width, Me.Height)
    Me.DrawToBitmap(bmp, New Rectangle(0, 0, Me.Width, Me.Height))
    Return bmp
End Function


Hopes this helps
-Josh
 
Top Bottom