473,320 Members | 2,020 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Alpha blending with Toolbar and Disabling buttons makes button dark gray

Hi,

I am using the .NET toolbar with VB.NET 2003.
My toolbar uses icons images that are actually PNG files and uses alpha
blending on it. So to make alpha blending work correctly with the Toolbar
and the Imagelist I had to use a tricky method with API calls that is
described like this by a MS MVP :

1) Use v6 of the common controls (have a manifest)
2) Load the PNG using GDI+
3) Create a 32bpp DIBSection (interop with Win32 GDI)
4) LockBitmap() on your GDI+ Bitmap
5) memcpy() the image bits to the 32bpp DIBSection
6) Use ImageList_Add() (Win32) to add the DIBsection to the ImageList

Using the method, the icons with alpha blending appears great on the
toolbar. The problem now is when is set Toolbar1.Buttons(0).Enabled = False,
instead graying out the image as if it was disabled, the buttons becomes
completely dark gray.

I tried to set Imagelist.TransparentColor = Color.Transparent, but it didn't
help.
By the way my Imagelist.ColorDepth is 32 bits

--
Philippe Meunier
Programmer
CHCA Computer Systems Inc.
Jul 19 '05 #1
0 3505

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Renato | last post by:
Hi, I have seen the board described in this link. http://www.seventech.it/english/merlinoboard/2.php I think that its a good solution to realize an embedded system with VGA output, in that cases...
1
by: markeboy | last post by:
What is the workaround to prevent toolbar buttons from displaying a grey square where the image should be once the toolbar button is disabled I have transparent color of the image list set to...
0
by: udir | last post by:
Hi all, I have a ToolBar on my form. Each button associated to an image from an ImageList. Why when I disable the button, the button becomes all gray ( and not grayscale image ) ? Do I...
4
by: udir | last post by:
Hi, I created a toolbar, added button and Icons from an ImageList. The icons are transparent for disable mode. The problem is that the icons does not look good, a blue outlet is added to the...
18
by: Andrew Christiansen | last post by:
Hey all. The images I create in photoshop with semi-transparent pixels (for instance in Photoshop text with a dropshadow with a transparent canvas) I've been saving in PNG format and then using...
3
by: Al | last post by:
Hi All, I am trying to get a 24x24 "Windows XP" icon to display correctly on a button in my toolbar. My icon has 8 layers (16x16, 16x16, 24x24, 24x24, 32x32, 32x32, 48x48, 48x48) with each size...
0
by: Philippe Meunier | last post by:
Hi, I am using the .NET toolbar with VB.NET 2003. My toolbar uses icons images that are actually PNG files and uses alpha blending on it. So to make alpha blending work correctly with the...
0
by: CrimeMaster | last post by:
Hi My IE toolbar is based on the Microsoft sample KKBar. I have draw a lot of buttons on it in which some are simply pushDown buttons and some are dropdowns.Beside this I have Made a Setting...
6
by: =?Utf-8?B?L2Rldi9udWxs?= | last post by:
Hello, i am using visual studio 2003 enterprise architect version. I am making apps for the .Net framework 1.1. While testing an interface, i discovered something strange. In this application...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.