views:

117

answers:

2

Hi,

Do you know of KeePass Password Safe 2? It's open-source and I'm trying to do some things but I've hit a dead end and can't find where the code is doing this and why it's doing it at all.

The source code is here and it's coded in C#: http://downloads.sourceforge.net/keepass/KeePass-2.08-Source.zip

The problem is that the icons of the TreeView nodes and ListView entries are not properly rendered if the come from an alpha-blended PNG file. For instance, I created a 16x16 image and filled with a solid red color but with 50% transparency and saved it as PNG. Then added this icon to one of the TreeView nodes and KeePass displays this icon in a grayish color.

I'm not the author of this application as you know and can't post specific blocks of codes as I don't know which one might be causing the problem and like I said, I have no idea where this is coming from.

Can anybody help me out here?

EDIT:
I think I've found the issue here: http://www.codeproject.com/KB/miscctrl/AlphaImageImagelist.aspx

+3  A: 

I do use KeePass 2.x to store all my credentials. Haven't had a chance to look at the source code, though.

I think your question would be more suitable when asked in the KeePass forums. Maybe they're already working on a fix ? You might be also able to contribute to the development of the program.

Cerebrus
That's what I'm trying to do and kinda need to fix the problem I described but can't seem to do it. And not many people seems to go to those forums... :/
Nazgulled
A: 

This is more like an issue with the common controls KeePass is using rather than a problem in the KeePass code itself. A Google search turned up this page in the MSDN; there's a lot of duplicated posts but it seems to suggest that you need to set the EnableVisualStyles property on the form to get alpha transparency to work.

Ken Keenan
Application.EnableVisualStyles() is already called as the first line in main() and I don't think there's a property named "EnableVisualStyles" for Forms.
Nazgulled
My mistake, it *is* a method on the Application object, not the Form
Ken Keenan