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
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.
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.
Related
Hi I just started a little hobby project.
The goal is to write a very simple dev environment including an editor with simple syntax highlighting.
I did tackle this years before as a rookie VB coder with little understanding what I was acutally doing. So I found my old project (batch file editor) and went through the code.
What I did back then was looping trough the RTB Text and looking for keywords. When I had found one I set the cursor poistion to the word select it and use the SelectionColor property to change the color then reset the cursor to its previous location.
This solution seemed pretty messy to me at first. And it obviously is. For example if you want to be able to process files and not limit the size you need to relieve stress and the algorithm which searches through the text. Doing this by using another thread may cause the cursor to jump to unwanted locations while the user is typing which could cause a definitely unwanted effect... So I went online searching for other solutions but as it seems there are pretty much no other approaches out.
So I thought before starting to rewrite a complete own TextBox supporting this I might ask here if anyone knows a good solution to this. Preferably without using any libraries not included into .Net but I'm starting to take this into consideration.
I'm wanting to create an animation in C# such as what you would see in a slot machine where the pictures spin round. I know I could manually move the location of a PictureBox or something like that but that seems like not a good idea to me.
How would you guys do it? It doesn't actually matter whether its in standard forms or WPF or anything else similar. Possibly using XNA?
I suggest you use WPF.
With Expression Blend you can easily do the animation you need.
I think I've already seen a slot machine WPF sample somewhere on the web.
I'll search for it and post it if I find it again
Edit
Nope it was a silverlight application, but code is almost the same. Here is the link:
http://www.dolittle.com/Silverlight/SlotMachine/SlotMachine.html
Anyway, if you find that approach to difficult I suggest you read a bit about simple WPF programatically driven animations. They're very easy to do, and with a few lines of code you can accomplish your needs.
Best regards
I'm working on a solution for my new project (in C#). I'm trying to make a dynamic image/animation combiner (maybe later even work with video's, but that's not required atm).
So basically my program is reading a xml file with all kinds of instructions the user needs to do. In the xml file it is possible that for 1 instruction multiple pictures are needed. So when there are 2 or 3 pictures (the maximum amount of pictures is 4) they need to be combined to 1 picture so I can show that on the image object on the main form. Also it is important that the pictures keep there proportions so the image doesn't look deformed.
I found a solution with GDI+ but it isn't that good as I wanted it and runs pretty slow on a bit older computers. Also combining animations with normal images is a real pain and goes very slow!
Is there a faster/easier way to do this? Maybe WPF is a solution but I got no experience with this.
Thnx for any help in advance!
This questsion is open now for mor then a year but I found the solution some time ago so I will post it here in case it is usefull for somebody else.
The best way to do this was creating to set up a grid dynamic. And then fill up each element of the grid with the needed media (Video, Image, animated gif's and even Viewport3D from another xaml file). Creating a grid in code is really easy so it should be a good solution for everybody who wants to do this in WPF.
This is related to (How to get HTML element coordinates using C#?)
The answer given here is quite good. However, opening up a full instance of Internet Explorer seems like overkill if you're trying to process a good deal of information from within your own spider.
Has anyone found/encountered/thought of a way to to do this using the underlying interface structures of IE (Like IHTMLDocument2 and it's brethren).
Thanks in advance.
Most browsers don't agree on per-pixel rendering in every situation. CSS Compliance, rounded corners, transparency support and padding bugs (I'm looking at you, IE6) are just a few.
The only way to reliably do this is to open a browser like the question you linked and figure it out that way. Even then, know that your results may not be the same as another browser will see it.
Site note: Different DPI & zoom settings for accessibility also will affect this, there are tons of variables in what people see. Mac font rendering also differs, so those users will usually see things slightly different as well.
I can place a couple of buttons in Silverlight, but I'm not that experienced with the Silverlight tools and capabilities.
What do you think I should use to create something like this?
The control would have to pull and ID from the database and according to that place an image asociated with the record.
I need it to be animated with some crispy movement.
How can I achieve this?
It's all possible, but you need to break the task down into smaller steps.
Once you've done that you should find that you can solve some of these with your current knowledge, others will resolve themselves with a little more research, but there will be some you need to ask questions about here.
I'd suggest you start that break down and try to solve the little problems. Then if you get stuck come back and ask more specific questions.
Well, with Silverlight and c# you can make the animations needed and such, and you can set a Silverlight Image control with a data bound source, so it loads the images dynamically, but Silverlight can't talk with databases directly, you'll need to use a webservice to interact between Silverlight and the database. Don't know how much you know but to not leave anything out, with Expression Blend you can make the graphical part of you're app fast and easy, and with Visual Studio you'll add the code-behind and functionality.
In this link you can find a example of how to make an image slide show with Silverlight, it may not be exactly what you're looking for, but it should give you a heads start.