Author Topic: Images for Image Buttons  (Read 5619 times)

0 Members and 1 Guest are viewing this topic.

jbuzbee

  • Swamp Rat
  • Posts: 851
Images for Image Buttons
« on: August 07, 2007, 11:09:44 AM »
This is what I would like:  In VBA, GIF's with transparent backgrounds can be used for any control with a image property.  I seem to remember AutoCAD bitmaps we're set up the same way, but it seems somewhere along the way this changed.  I can create a bitmap in AutoCAD 2006, using the eraser tool to make the background transparent - like it used to be - but both AutoCAD and OpenDCL forms show the background as a grey color.  What is the deal?  Am I creating these images wrong?  Is there a better way?  I have Photoshop CS3 . . .?

Any insight into this most complexing issue would be greatly appreciated - thanks
James Buzbee
Windows 8

BazzaCAD

  • Guest
Re: Images for Image Buttons
« Reply #1 on: August 07, 2007, 12:51:12 PM »
I do know that you can import a gif with a transparent background into a pic. box, but I'm not sure if it works with an Img. button.
I know Owen has said that image processing isn't one of his strengths, so I'm not sure it will get fixed anytime soon. So if there are any C++ programers out that that are good with image processing now would be a good time to speak up. :)

tlindell

  • Guest
Re: Images for Image Buttons
« Reply #2 on: August 07, 2007, 07:21:20 PM »
2006 was actually the first release I was able to keep an icon stick and use the transparent grey.  Before that release, it would always change it to the windows toolbar color with a new randomly named icon.

A grey with RGB value of 192 for each will import into either program as transparent.  I think there is a certain spectrum in every color that also comes in half transparent for blending to the background, but I haven't tried to pin them down. 

LE

  • Guest
Re: Images for Image Buttons
« Reply #3 on: August 07, 2007, 10:05:18 PM »

BazzaCAD

  • Guest
Re: Images for Image Buttons
« Reply #4 on: August 08, 2007, 12:52:28 AM »
To draw a bitmap with transparency color see:

http://www.codeguru.com/Cpp/G-M/bitmap/specialeffects/article.php/c1749/

Hopefully this info will be helpful to Owen.

jbuzbee

  • Swamp Rat
  • Posts: 851
Re: Images for Image Buttons
« Reply #5 on: August 08, 2007, 07:42:46 PM »
tlindell - that did it!  thanks!
James Buzbee
Windows 8

BazzaCAD

  • Guest
Re: Images for Image Buttons
« Reply #6 on: August 10, 2007, 03:19:41 PM »
A grey with RGB value of 192 for each will import into either program as transparent.

Wow tlindell, this was a great tip. It's working great & my buttons look great.
Thx a lot. :)

BazzaCAD

  • Guest
Re: Images for Image Buttons
« Reply #7 on: August 10, 2007, 08:25:32 PM »
Strange the 192,192,192 works on GraphicButtons, but not PicBox...

tlindell

  • Guest
Re: Images for Image Buttons
« Reply #8 on: August 10, 2007, 09:37:21 PM »
That is strange.  Initially, when I assign an icon to the picture box, the grey becomes white, but when I change the background color of the picbox, the icon remains with a white background.

Glad the info was useful otherwise. :mrgreen: