Transparencies/Bitblt - Can someone explain it to me --- PLEASE
I know this has probably been asked and answered a hundred times but I'm definitely an ameteur at this stuff and I don't quite understqnd it all. I've written a game in which a small picturebox moves around a form over a number of other larger pictureboxes. I'm currently doing the movement with simple adjustments of the Top and Left properties of the thing. The smaller picturebox contains a simple black circle with a white background at the corners. Of course I would like the white corners of the picturebox to be transparent. Can someone please tell me how to do this in simple, easy-to-understand terms? PLEASE?
I'm not gonna give you my IP address! Ok... Portugal, South-Western Europe, 3rd rock from the sun (our star is easy to find, a 47 Ursae Majoris in the Milky Way :p )
Posts
1,457
Hey hey, wait, he's using picture boxes, so he doesn't need BitBlt
All you need to do is use an image control (not a picture box). If the file you choose is a GIF file with transparency, the image control will be transparent like you want! I think that Paintbrush can save GIF files, but if it doesn't, you'll need another graphics program.
To learn how to use realistic effects in your games like fire, rain, snow and magic effects, read my article on particles systemshere.
Jotaf's Theories!
"Cats land on their feet. Toast lands peanut butter side down. A cat with toast strapped to its back will hover above the ground in a state of quantum indecision."
GIFs are crap, years ago I tried the same but they're very slow... you can see how first a black mask is drawn, then the picture over this mask if you try to do anything with the picture..
I'm not gonna give you my IP address! Ok... Portugal, South-Western Europe, 3rd rock from the sun (our star is easy to find, a 47 Ursae Majoris in the Milky Way :p )
Posts
1,457
But his game is not BitBlt based, it's based on pictureboxes (by setting their Top/Left borders). So he can't use BitBlt
To learn how to use realistic effects in your games like fire, rain, snow and magic effects, read my article on particles systemshere.
Jotaf's Theories!
"Cats land on their feet. Toast lands peanut butter side down. A cat with toast strapped to its back will hover above the ground in a state of quantum indecision."
While I did state that I was using pictureboxes, I'm not constraining myself to using them. I'm willing to learn the "right" way of doing things. Speed is not much of a consideration as my game is fairly slow-paced. Perhaps I should upload what I have so far and get a concensus on how I SHOULD be doing it... So, without further ado, here it is...