If you are using BitBlt, come to this page.
This is where you will find the Knowledge of BitBlt.
Gurus and good BitBltters are welcome to share their
knowledge.
Knowledge from Me:
Basic Blitting!
Code:Option Explicit Public Const SRCCOPY = &HCC0020 ' (DWORD) dest = source Public Declare Function BitBlt Lib "gdi32" Alias "BitBlt" (ByVal hDestDC As Long, ByVal x As Long, ByVal y As Long, ByVal nWidth As Long, ByVal nHeight As Long, ByVal hSrcDC As Long, ByVal xSrc As Long, ByVal ySrc As Long, ByVal dwRop As Long) As Long Function RectBlit(Dest as PictureBox, X as Integer, Y as integer, Source as Picturebox) as Long Dim RetCode Dim HoldScale1, HoldScale2 HoldScale1=Dest.Scalemode Dest.Scalemode=3 HoldScale2=Source.Scalemode Source.Scalemode=3 RectBlit = 0 'for now, we will assume it failed RetCode = BitBlt(dest.hdc,x,y,source.scalewidth,source.scaleheight,source.hdc,0,0,SrcCopy) Dest.ScaleMode=HoldScale1 Source.ScaleMode=HoldScale2 RectBlit=RetCode End Function 'usage: RC=RectBlit(picture2,0,0,picture1)




Reply With Quote