
How can I paint a Picture in a Form in a Form Paint method
Use code such as this to declare and load the bitmap into the
'make bitmap a member of the Form class
dim pict as Bitmap
'then load the bitmap in the form's Load event
Dim Bmp As Bitmap = Image.FromFile("c:\sync.bmp")
'then in the paint event, use Graphics.DrawImage to draw it somewhere on the
form
'top left corner
Dim rect as Rectangle = new Rectangle(0, 0, 100, 100)
e.Graphics.DrawImage(pict, rect)
==========================================
Clay Burch
Syncfusion, Inc.
Visit www.syncfusion.com to download a free trial of Essential Suite
Quote:
> How can I paint a Picture in a Form in a Form Paint method
> I mean with out using controls, something like this
> dim picture1 As Picture
> picture1 = loadImage ("d:\im.jpg")
> paintInstr x,y,picture1