Skip to content

Adding image

dian ramadhani

Asked May 14, 2007, 10:36 PM EDT1 answer
Share
LinkedInX
somebody please help me to add multiple image into the same picturebox control using bitblt function please..... :'(

1 Answer

Know the answer? Post it. Somebody with the same question will find it here.

  • 0
    You have to create a graphics object from the picturebox
    VB.NET
    
        Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
    
            Dim g As Graphics = Graphics.FromHwnd(Me.PictureBox1.Handle)
            Dim i As Image = Image.FromFile("image.bmp")
    
            With g
                .FillRectangle(Brushes.White, 0, 0, Me.PictureBox1.Width, Me.PictureBox1.Height)
                .DrawImage(i, 0, 0)
            End With
    
        End Sub
    0