What is the best way to animate a jpeg picture with transparency over a form background ?
I hope this is clear... I'll give an example... Let's say you've got a picture of a sea set as a background on a form! And you want to put a picture of a fish on it! Then you can't just put that fish on the form in a picturebox because it will be squared right... I want just the fish on my form and not the full square... Is there an easy way for doing that? Because I'm just a newbie but I would like to know more about that sort of programming!
Do you guys have codes for that? Which are also easy to understand? :-D
Greetz Pieter
Ps: Thanx in advance ;-)
Kind Regards,
Pieter
PS: If you found someone's answer helpful, please be so kind to rate that person.
Thanks.
The fish needs to be a BMP or GIF (lossless compression of some sort), and can't be lossy compressed (ex. JPEG). The reason is the colour information is lost and the pixels aren't exactly white (if you had them white before).
All contents of the above post that aren't somebody elses are mine, not the property of some media corporation.
(Just a heads-up)
here's an idea:
if you want to use straight vb....
Save the picture with a black background where you want it to be transparant. then make a mask. where the pic is black, make it white, where its color, make it black. then:
blit the mask using PaintPicture. in the opCode param put vbSrcAnd. then, in the exact same spot, blit the the source pic using PaintPicture, but put vbSrcPaint in the opCode Param. This should make it transparant. tell me if it works.