How can I paint a Picture in a Form in a Form Paint method 
Author Message
 How can I paint a Picture in a Form in a Form Paint method

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


Wed, 22 Dec 2004 16:24:31 GMT  
 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



Wed, 22 Dec 2004 17:31:50 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Getting an invisible form to paint itself to a picture box

2. calling the paint event of a form from another form

3. Paint picture method

4. Paint Picture Method

5. Loose Drag/Drop feature after Paint Picture Method

6. Paint Picture Method

7. UserControl VB5 Paint NOT Painting in Compiled EXE !?!

8. Form Refresh (on paint???)

9. Control the painting of a form

10. screen painting on form loadup

11. Keeping form painted when task-swapping during a long operation

12. Form fails to paint, app dies - why?

 

 
Powered by phpBB® Forum Software