Results 1 to 8 of 8

Thread: Transparent images?

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Oct 2001
    Location
    Gränna, Sweden
    Posts
    23

    Transparent images?

    I'm in desperate need of an Image control which can display jpgs and bmps with a certain color (255,0,255 in my case) transparented. It has to show other images trough the transparent part and also detect clicks only on the nontransparent part. Anything is appreciated!
    Bye

  2. #2
    Fanatic Member 007shahid's Avatar
    Join Date
    Feb 2001
    Posts
    562
    You can you this attached control. It was originally programmed by Fox. I made some additions. Choose a picture for the control and set Mask Color property the color you want to be invisible
    Attached Files Attached Files
    THE TIME/WEATHER IS
    Don't know how to use APIs or have problem with them,
    Download API-Guide & API-Viewer from http://www.allapi.net

  3. #3
    PowerPoster Fox's Avatar
    Join Date
    Jan 2000
    Location
    *afk*
    Posts
    2,088
    Wow last time i saw my sprite control was when I put it on the website.. that's years ago

    Again note please: The Sprite is a UserControl and it uses MaskPicture and MaskColor to get transparency - this will be very slow if you use big pictures, many pictures or move them around fast. Just for you know... but it works fine and supports clicks

  4. #4
    jenk
    Guest
    Hello Fox,
    I've D/L this control as it looks interesting. I have now put it
    in VB. Please could you give me some examples for the
    properites and methods as it looks like it supports animation
    which is a bonus!

    Thanks

    Jenk.

  5. #5
    Fanatic Member 007shahid's Avatar
    Join Date
    Feb 2001
    Posts
    562
    I added the animation
    Though I have still not perfected it.
    The attached source code is the only copy I have of the sprite.
    It is modified a lot. Fox can you please give the original. I need it.
    Thanks
    Attached Files Attached Files
    THE TIME/WEATHER IS
    Don't know how to use APIs or have problem with them,
    Download API-Guide & API-Viewer from http://www.allapi.net

  6. #6
    jenk
    Guest
    Thanks 007shahid, I'll give it a whirl.....

    Jenk

  7. #7
    Fanatic Member 007shahid's Avatar
    Join Date
    Feb 2001
    Posts
    562
    Jenk Alert,
    Please modify the soucre codes as follows

    Code:
    Public Property Let  TotalFrames(ByVal uTotalFrames As Long)
    
         PropertyChanged "TotalFrames"
         TFrames = uTotalFrames
         ReDim Pictures(uTotalFrames)
    End Property
    The array did not get redimmed during runtime
    THE TIME/WEATHER IS
    Don't know how to use APIs or have problem with them,
    Download API-Guide & API-Viewer from http://www.allapi.net

  8. #8

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