Combining picture boxes... without brain surgery?
Help! In VB6, I have two picture boxes, pic1 and pic2. I'd like to copy pic1 to pic2, minus its white areas---so that pic1's non-white areas appear over pic2.
(pic2 doesn't even have to be an image, just a solid color.)
Someone suggested I look at the BitBlt info on MS's site, but it's way over my head. If that is the only way to do it, maybe someone could take pity on me and post a bit of sample code Thanks!
Re: Source Code Without API
Quote:
Originally posted by VBD
picture2.autoredraw = true
picture2.scalewidth = picture1.scalewidth
picture2.scaleheight = picture1.scaleheight
For X% = 0 to Picture1.scalewidth
For y% =0 to picture1.scaleheight
if Picture1.Point (X%,Y%) <> Picture1.BackColor Then
Picture2.circle(X%,Y%),1,picture1.point(X%,Y%)
end if
next
next
The above code copies a picture from pic1 to pic2. Anything that is Pic1's backcolor it doesn't copy
That CODE lags for me!
Re: Source Code Without API
Quote:
Originally posted by VBD
picture2.autoredraw = true
picture2.scalewidth = picture1.scalewidth
picture2.scaleheight = picture1.scaleheight
For X% = 0 to Picture1.scalewidth
For y% =0 to picture1.scaleheight
if Picture1.Point (X%,Y%) <> Picture1.BackColor Then
Picture2.circle(X%,Y%),1,picture1.point(X%,Y%)
end if
next
next
The above code copies a picture from pic1 to pic2. Anything that is Pic1's backcolor it doesn't copy
That CODE lags for me!