473,796 Members | 2,669 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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.Button s(0).Enabled = False,
instead graying out the image as if it was disabled, the buttons becomes
completely dark gray.

I tried to set Imagelist.Trans parentColor = Color.Transpare nt, but it didn't
help.
By the way my Imagelist.Color Depth is 32 bits

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

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

Similar topics

6
326
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 where, to use the PC, is not convenient. I have seen that it's available also a dev kit to develop the code in C++ and it is not necessary to use an operating system. How is it possible to work with a system without operating system? You thing...
1
1562
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 transparent (after trying every other color) Toolbar images are set at design time - bound to an imagelist
0
1398
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 have to apply a second grayscale image for each button for disable mode ?
4
3076
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 icon. If the image is not transparent everything looks good, but of-course, when the buttons are disabled, the icons all gray.
18
7444
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 them in my VB.NET app using the picturebox control. I was really happy when I learned that you could use PNG images in VB.NET so your images could blend in with the form's background color. But, is PNG the ideal image format to use with these...
3
2473
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 having a 256 and windows xp colored image. When my application runs, the icon with 256 colors appears rather than the xp icon. I have tried using a manifest as well as Application.EnableVisualStyles. No luck. I have seen numerous articles...
0
926
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 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+
0
892
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 button.By which user can Customize the Buttons on toolbar,means S/He can select the buttons and deselect the buttons from a Property page. This information i have placed in Windows registry.When I create the toolbar i Create the toolbar based on the...
6
3902
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 we have a standard toolbar that is at the top of the form window. It contains about 8 buttons that use images from an imagelist. Sometimes we hide buttons thru the code. When a button is hidden, i assumed that it wasn't clickable. It appears
0
10452
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10221
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10169
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10003
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9050
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5440
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5569
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4115
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3730
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.