Dev-Picayune

picayune: of little value or importance

Nevada Attempt 2 has Begun!

I have officially restarted the Nevada project now. After some experimenting with transparency some more, I have realized that even with my previously posted fix that dealt with .NET 1.1 and VS 2003, that there were still some problems. Problem number one was that no matter what you pick as your transparent color, black text would not show up. Also, after populating a picture or two and then hitting the ALT key while the window had focus, caused a copy of part of the image to be redrawn on another part of the window. So needless to say it wasn’t pretty. Stripping out the fix and simplifying, I decided that VS 2005 (even though still in beta) with .NET 2 (obviously also still in Beta) was the way to go. The following screen shot will show the effect I am now getting which is the background of the toolbar has an opacity level separate from the icons themselves. nevada screen shot

How did I do this? I created two separate windows. The first window is compromised of several panels which are loaded with images at runtime (because I want to make this thing skinnable even if nobody ever does any skins for it). This window has a opacity set (approximately 50% I think but it will be completely configurable). Then a second window is created that is synced to stay right on top of the main window. I snag all the activate events and bring to top the child window so that it is always visible and has focus. This window has a transparency key and background color both set to Magenta. The icons and the Nevada text are controls populated on this window. This window is currently set to be completely opaque but obviously could be set otherwise (and indepent of the bottom window). I’d be the first one to admit that this is a bit of a hack but it gives me absolute freedom. I could even have the icons appear to be drawn outside the main body of the toolbar if I wanted.
But now that I have restarted the whole process, I’m actually farther behind with this new version than I was to begin with. However, I feel like my design will be much better as experience has greatly improved my OOP skills.

No comments

No comments yet. Be the first.

Leave a reply