|
-
Oct 21st, 2000, 01:21 PM
#1
Thread Starter
Fanatic Member
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.
-
Oct 21st, 2000, 10:28 PM
#2
PowerPoster
You can, but it's easier to use an Image instead...
-
Oct 22nd, 2000, 03:18 PM
#3
Thread Starter
Fanatic Member
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
-
Oct 22nd, 2000, 05:46 PM
#4
Frenzied Member
Easy!
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!
-
Oct 23rd, 2000, 11:31 AM
#5
PowerPoster
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...
-
Oct 25th, 2000, 04:27 PM
#6
Thread Starter
Fanatic Member
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
-
Oct 26th, 2000, 02:24 PM
#7
Fanatic Member
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!
-
Oct 26th, 2000, 04:59 PM
#8
PowerPoster
I don't know if it supports PaintPicture, I never really used this function.. you can download it here.
To Mad Compie: My sprite (transparent picture control) does not flicker.
-
Oct 31st, 2000, 03:38 PM
#9
Thread Starter
Fanatic Member
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
-
Oct 31st, 2000, 04:36 PM
#10
PowerPoster
Why using icons??? Bitmaps have more colors...
-
Nov 1st, 2000, 04:19 PM
#11
Thread Starter
Fanatic Member
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
-
Nov 1st, 2000, 04:27 PM
#12
PowerPoster
Use my sprite control - you can select which color you want to have transparent...
-
Nov 3rd, 2000, 05:09 AM
#13
Thread Starter
Fanatic Member
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
-
Nov 3rd, 2000, 06:15 AM
#14
PowerPoster
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
-
Nov 3rd, 2000, 01:27 PM
#15
Thread Starter
Fanatic Member
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
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|