C# and Icons
While poking around with C# the other day, I was trying to figure out some key technical aspects to my program launching bar thing. I needed a way to get the default icon for a program or file and display it on the window. I found a related article here about ?? How would I extract high-color icons (with alpha channel)??
. Of course the answer to that question is that getting the basic icons is straight forward using the first code snippet found and I got it to work. Also, with a little image adjustment within C# I can have it do a cool enlarging effect when you mouse-over the icon. Even though it is a little rough… I am planning on doing a 32×32 and enlarging to a 48×48 on mouse over. The effect is nice and it will have the program a fancier feel to it. As I have stated earlier, I am not keen on doing skins since that deviates from applying the same look and feel to all windows but I am still toying with idea of having some type of skin support — the biggest deal is shaped windows which I have played with some in C#. As yet, I have not found a reliable image mask shape method (like wxpython has), but rather you have to specify via points, lines, circles, arcs, etc… what the shape of the window is. Yuck! So far I am not convinced I will be doing much with that. However, I am finding it hard to proceed without definitively deciding on the full scope of how the UI should work. My next goal is to define an XML structure for storing the programs to launch as well as figuring out how to use the ExtractIcon API to offer the user a choice of different icons if they want. Then I need to decide on how I am going to dynamically display and destroy the controls (something I have not done in .NET yet).
No comments yet. Be the first.
Leave a reply