PC Review


Reply
Thread Tools Rate Thread

Alpha blending with Toolbar and Disabling buttons makes button dark gray

 
 
Philippe Meunier
Guest
Posts: n/a
 
      24th Jul 2003
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.


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Alpha blending =?Utf-8?B?U3Rvcm15NzU0MEBhb2wuY29t?= Spyware Discussion 3 6th Apr 2006 07:04 AM
Alpha blending =?Utf-8?B?U3Rvcm15NzU0MEBhb2wuY29t?= Spyware Announcements 1 5th Apr 2006 03:31 AM
.NET CF 2.0: Will alpha blending be available ? =?Utf-8?B?QmVydHJhbmQgRm9udGFpbmU=?= Microsoft Dot NET Compact Framework 4 18th Sep 2004 09:03 AM
.NET CF 2.0: alpha blending available ? =?Utf-8?B?QmVydHJhbmQgRm9udGFpbmU=?= Microsoft Dot NET Compact Framework 1 17th Sep 2004 11:00 PM
alpha blending... :\\\\derian Microsoft VB .NET 3 13th Oct 2003 06:27 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 09:11 AM.