Click to See Complete Forum and Search --> : icons


phil m
March 19th, 2001, 03:29 AM
OK, I have an icon. But it's a square. It is isn't transparent. How do I get it to show only the picture rather than the background?

Many thanks

Phil

Cimperiali
March 19th, 2001, 06:01 AM
Your icon is really an icon with tranparent bakground( you can see it using window explorer)? If so, how you display it (on icon property of form, in a picturebox, in an imagebox...)? if you need a transparent picture, try with ImageBox control.
Hope this help.
Cesare Imperiali

Special thanks to Lothar "the Great" Haensler. Come back soon, you Guru.

phil m
March 19th, 2001, 06:24 AM
Hi There

I'm trying to do 2 things

1/ get a picture of a cat to slide over the backdrop of my form without the white that surrounds the cat. Animation, I guess.

2/ Make my mouse pointer that same cat - even if it is a small one.

Many thanks

Phil

John G Duffy
March 19th, 2001, 01:17 PM
There is a nice sample at
Http://www.freevbcode.com/code/bitmap_region.zip that shows you how to create a tranparent bitmap.

With this you should be able to "Skin" your cat.
Here is some of the Header information regarding the sample.
'
'
Use a Bitmap to Create a Skinnable Irregular-Shaped Form
Author: Elad Rosenheim (Developer of the Month)
Category: Screen/Graphics
Type: Applications
Difficulty: Advanced


Version Compatibility: Visual Basic 5 Visual Basic 6


More information: A lot of applications today allow custom bitmaps ("skins") to be used as the user-interface/background to the program - Take Winamp for example.

Some applications (such as the MP3 players Sonique and kjofol) allow you to use non-rectangular bitmaps with transparent sections.

The following demo does just that. I'm no graphics artist, though, so to create a better-looking skin you'll have to work hard - but the code is here for you to do it.

Note that you can move the form by pressing and dragging the mouse anywhere on the form - even though it doesn't have a title bar.




John G

Clearcode
March 20th, 2001, 03:06 AM
A decent icon designer program for Windows should be available for download somewhere. The resource editor that comes with Visual C++ is an example. (If not, I might even write one myself).

The basic way an ICON works is that it contains 2 bitmaps - an AND bitmap which is the coloured bitmap and an XOR bitmap which defines the shape to 'cut out' of the background to put the AND bitmap in.
In your case the XOR bitmap is just a square, whereas you need to change it to be the shape of your AND bitmap and it will act like a "proper" Windows ICON.
You can use the same image as a pointer as well.

-------------------------------------------------
Ex. Datis: Duncan Jones
Merrion Computing Ltd
http://www.merrioncomputing.com