• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 178
  • Last Modified:

32-bit icons

Does anyone know how to get these working? I need them in a toolbar control and a listview control (with View=Details) .. Whenever I try adding them, any areas with alpha show up as pure black. I've tried a manifest file, but that doesn't seem to be working. I prefer no external controls, but if that's the only way, then I guess I have no choice.
0
UrbanPuppet
Asked:
UrbanPuppet
1 Solution
 
gregoryyoungCommented:
0
 
UrbanPuppetAuthor Commented:
That's for buttons, but how about toolbars and listviews? I don't see a paint event for them.
0
 
gregoryyoungCommented:
"When you set the Image property of a Microsoft Windows Form (Winform) control to a 32-bit alpha-blended icon, the icon that is displayed on the control loses the alpha channel. The transparent regions of the icon are rendered as solid. This behavior occurs at design time and at run time for the Winform control. "

only the example is a button .
0
Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 
Daniellus83Commented:
No paint event? try this:

        ToolBar1.Refresh()
        ListView1.Refresh()
0
 
planoczCommented:
Try changing your transparent properties to Black in your listview control
0
 
UrbanPuppetAuthor Commented:
gregoryyoung, I realize it's an example, but it's an example work-around and I need one for other controls.. It has to be possible to do this..
daniellus83, just tried, those don't help show the alpha.
planocz, that would (if anything) just hide it, I want the alpha to show..

Thanks for even clicking/responding in the first place guys, but I'm still looking for a definite answer
0
 
gregoryyoungCommented:
I believe the workaround is fairly clear, you need to override the entire paint method to call DrawIcon yourself, this sounds a whole lot easier than it is .... I would recommend just grabbing this http://www.binarymission.co.uk/binarylistview.aspx which fixes this and a few other bugs.

0

Featured Post

Receive 1:1 tech help

Solve your biggest tech problems alongside global tech experts with 1:1 help.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now