Click to See Complete Forum and Search --> : Transparent...
Arie
Oct 21st, 2000, 01:21 PM
Hi!
I want to ask something that really
bugs me!
How can I do that when I put an icon
in a picturebox and some part in the icon is
transparent. but the picturebox has his backcolor
that bugs me.
can I remove or change that backcolor to transparent?
Thank you anyway,
Arie.
Fox
Oct 21st, 2000, 10:28 PM
You can, but it's easier to use an Image instead...
Arie
Oct 22nd, 2000, 03:18 PM
Yeah, but Image is not like a picturebox.
I can't use in Image the PaintPicture.
I need it for a smooth animation.
If I use Image it do flashes in the image
and it's very ugly for my game.
Are you sure that there isn't any way to
make the BackColor transparent?
Maybe it's like how I make a form transparent?
I don't know!
If you know, answer...
Thank you anyway,
Arie.
Visit: http://www.nip.to/camel2000
Jotaf98
Oct 22nd, 2000, 05:46 PM
Try painting the image to the form, at a certain position (all you gotta do is experiment a bit with the X/Y coordinates of where you paint it). See, no need for a picture box - because it doesn't support transparency!
Fox
Oct 23rd, 2000, 11:31 AM
If you really need the picture control properties you can also use my sprite control (download at my page). You'd say it's a picture boy with transparency...
Arie
Oct 25th, 2000, 04:27 PM
Hey, Fox!
I have two questions for you:
1) Where in your website is this control that you said?
2) Does it act like a regular PictureBox, with PaintPicture
and everything?
I need that because of the flahses that I get from the
Images when I switch pictures quickly.
I tried PictureBox and It's really good.
But I need a PictureBox with Transparent BackColor
like in the Image Control.
Understand?
Thank you anyway,
Arie.
Visit: http://www.nip.to/camel2000
Mad Compie
Oct 26th, 2000, 02:24 PM
You should use your own routines with BitBlt instead of moving he image control, which causes FLICKER!
When the image control contains a big transparent picture, then you get even more strange effects while loading the form.
So, work with BitBlt, memory DC's (which contains for example the complete background).
To get rid of the flicker, you should NOT replace the whole transparent picture with the background, because that's the flicker effect!
Instead, only BitBlt the background above the parts between the old XY position and the new XY position of the transparent image. So, only the borders are restored with the background (which are mostly small when you're moving pixel by pixel) and THIS REMOVES THE FLICKER!
Fox
Oct 26th, 2000, 04:59 PM
I don't know if it supports PaintPicture, I never really used this function.. you can download it here (http://orion.spaceports.com/~mccloud/coding/graphics/sprite.zip).
To Mad Compie: My sprite (transparent picture control) does not flicker.
Arie
Oct 31st, 2000, 02:38 PM
I downloaded your control from the link you wrote
and this control does not support the transparent of
the ICO files!
I need a control that supports that and does not flicker!
It's driving me crazy!!! It can't be that that control
doesn't exist!
Auuugh!
THANK YOU ANYWAY,
ARIE.
PLEASE VISIT: http://WWW.NIP.TO/CAMEL2000
Fox
Oct 31st, 2000, 03:36 PM
Why using icons??? Bitmaps have more colors...
Arie
Nov 1st, 2000, 03:19 PM
And how I supose to draw with a transparent
color in a bitmap picture!?!?
I have a picture (32x32 - Icon) and it needs
to be with a transparent background!
What is so hard about it?!?
Ouugh...
I NEED AN ANSWER QUICKLY,
I'LL EXPLODE!!!
THANK YOU ANYWAY,
ARIE.
VISIT: http://www.nip.to/camel2000
Fox
Nov 1st, 2000, 03:27 PM
Use my sprite control - you can select which color you want to have transparent...
Arie
Nov 3rd, 2000, 04:09 AM
How I select the color of transparent?
But you know what? when I put the Icon in your control
the transparent looks in purple. is this the
transparent color?
Explain more...
Thank you anyway,
Arie.
Visit: http://www.nip.to/camel2000
Fox
Nov 3rd, 2000, 05:15 AM
Yeah, the default transparent color is purple indeed. I dunno if you can really change it, it's an old control... if not just use purple ;)
Arie
Nov 3rd, 2000, 12:27 PM
So... I can draw ICO and BMP files with a transparent
purple? and then it will be transparent in
runtime?
If yes, thank you for all the help,fox.
Talk to you in the next problem...
Arie.
Visit: http://www.nip.to/camel2000
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.