Dim objGraphicsSource As Graphics = PictureBox1.CreateGraphics
Dim bmpSource As New Bitmap(PictureBox1.Width, PictureBox1.Height,
objGraphicsSource)
Dim objGraphicsBmp As Graphics = Graphics.FromImage(bmpSource)
Dim hdcSource As IntPtr = objGraphicsSource.GetHdc
Dim hdcDest As IntPtr = objGraphicsBmp.GetHdc
BitBlt(hdcDest, 0, 0, 50, pbxSource.Height, hdcSource, 0, 0, 13369376)
PictureBox2.Image = bmpSource.Clone()
Declare Auto Function BitBlt Lib "GDI32.DLL" ( _
ByVal hdcDest As IntPtr, _
ByVal nXDest As Integer, _
ByVal nYDest As Integer, _
ByVal nWidth As Integer, _
ByVal nHeight As Integer, _
ByVal hdcSrc As IntPtr, _
ByVal nXSrc As Integer, _
ByVal nYSrc As Integer, _
ByVal dwRop As Int32) As Boolean
Bookmarks