Results 1 to 15 of 15

Thread: Transparent...

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Feb 2000
    Location
    Israel
    Posts
    636

    Unhappy

    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.

  2. #2
    PowerPoster Fox's Avatar
    Join Date
    Jan 2000
    Location
    *afk*
    Posts
    2,088
    You can, but it's easier to use an Image instead...

  3. #3

    Thread Starter
    Fanatic Member
    Join Date
    Feb 2000
    Location
    Israel
    Posts
    636
    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

  4. #4
    Frenzied Member Jotaf98's Avatar
    Join Date
    Jun 2000
    Location
    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

    Cool 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!

  5. #5
    PowerPoster Fox's Avatar
    Join Date
    Jan 2000
    Location
    *afk*
    Posts
    2,088
    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...

  6. #6

    Thread Starter
    Fanatic Member
    Join Date
    Feb 2000
    Location
    Israel
    Posts
    636
    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

  7. #7
    Fanatic Member Mad Compie's Avatar
    Join Date
    Aug 2000
    Location
    Kuurne (Belgium)
    Posts
    553
    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!

  8. #8
    PowerPoster Fox's Avatar
    Join Date
    Jan 2000
    Location
    *afk*
    Posts
    2,088
    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.

  9. #9

    Thread Starter
    Fanatic Member
    Join Date
    Feb 2000
    Location
    Israel
    Posts
    636

    Angry

    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

  10. #10
    PowerPoster Fox's Avatar
    Join Date
    Jan 2000
    Location
    *afk*
    Posts
    2,088
    Why using icons??? Bitmaps have more colors...

  11. #11

    Thread Starter
    Fanatic Member
    Join Date
    Feb 2000
    Location
    Israel
    Posts
    636

    Angry

    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

  12. #12
    PowerPoster Fox's Avatar
    Join Date
    Jan 2000
    Location
    *afk*
    Posts
    2,088
    Use my sprite control - you can select which color you want to have transparent...

  13. #13

    Thread Starter
    Fanatic Member
    Join Date
    Feb 2000
    Location
    Israel
    Posts
    636
    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

  14. #14
    PowerPoster Fox's Avatar
    Join Date
    Jan 2000
    Location
    *afk*
    Posts
    2,088
    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

  15. #15

    Thread Starter
    Fanatic Member
    Join Date
    Feb 2000
    Location
    Israel
    Posts
    636
    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
  •  



Click Here to Expand Forum to Full Width