1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
   | Dim b2 As New System.Drawing.Bitmap(ctrl.Width, ctrl.Height, BackImg.PixelFormat)
 
 
                Dim bmpSource As System.Drawing.Imaging.BitmapData
                Dim bmpDest As System.Drawing.Imaging.BitmapData
 
                bmpSource = BackImg.LockBits(New Rectangle(ctrl.Location, ctrl.Size), Imaging.ImageLockMode.ReadWrite, BackImg.PixelFormat)
 
                bmpDest = b2.LockBits(New Rectangle(0, 0, ctrl.Width, ctrl.Height), Imaging.ImageLockMode.ReadWrite, BackImg.PixelFormat)
 
                Dim b(bmpSource.Width * bmpSource.Height - 1) As Integer
                System.Runtime.InteropServices.Marshal.Copy(bmpSource.Scan0, b, 0, bmpSource.Width * bmpSource.Height)
                System.Runtime.InteropServices.Marshal.Copy(b, 0, bmpDest.Scan0, bmpDest.Width * bmpDest.Height)
 
                BackImg.UnlockBits(bmpSource)
                b2.UnlockBits(bmpDest) | 
Partager