by Saed abumokh (7 Submissions)
Category: Graphics
Difficulty: Intermediate
Date Added: Wed 3rd February 2021
Rating: (2 Votes)
This code draws two pictures that merged - with gradually alpha pixels (like in photoshop)this code is realy wonderful but it's not so hard although its fast, it uses AlphaBlend API function, that requires the destination hDC and source hDC and both's recangle (left,top,width,height) and the blend value(beware: the blend value is between 0 and 255, but in AlphaBlend API function multiply the blend value by 256^2 or in hex add 4 zeroez in the right side like: &H9F --> &H9F0000)
API DeclarationsPrivate Declare Function AlphaBlend Lib "msimg32.dll" (ByVal hdc As Long, ByVal lInt As Long, ByVal lInt As Long, ByVal lInt As Long, ByVal lInt As Long, ByVal hdc As Long, ByVal lInt As Long, ByVal lInt As Long, ByVal
Download Alpha gradient Pictures (543 KB)