Skip to main content
GameDev.net gamedev.net
🔒 Locked

[.net] Shadows & Transparency in Windows Forms [C# .NET 2.0 WinForms]

Started by ArchG Jun 25, 2009 at 4:40 PM 1 replies 5.5k views
Original Post
ArchG
ArchG
Over the weekend I was testing out some software and came across this Login Screen.. I thought this was really cool looking, and wanted to make one very similar to it (the shadows around it, the half transparency, that sort of thing) I initially thought it would be very easy, but I'm having a heck of a time. Picture of the Form It seems like you could do it with just a couple panels, couple graphics, and a transparent form....So I set out on my task. I didn't get very far at all... First thing I did, was make my background color, some random color (green), and then set the transparency key to the same color. This gives me a completely transparent form. Next I set my Forms borders to None. I thought this would allow me to display pictures and such....which it does...sort of. Next step I added a picture box with my 'drop shadow border in it' (just a half transparent black shadow type thing)...But now any part of my picture that has transparency...will show up as the form background color (green)... This makes it very tough to get the drop shadow look around the form. I guess I'm just asking you kind folks if I'm going in the right direction, or if I should make a U-Turn, and go about this some other way. If someone could kick me the right direction here...That would be greatly appreciated. (I've never really used WinForms for anything fancy before, just strictly business type apps until now...so take it easy on me)
BLiTZWiNG
BLiTZWiNG
I haven't tried it myself, but they're possibly doing a custom rendering of the on paint method?

Or maybe it's WPF?
ChaosEngine
ChaosEngine
While it might be possible to do this in WinForms, I'd really recommend WPF for this. I could probably knock up a ui like that in WPF in a few minutes.
if you think programming is like sex, you probably haven't done much of either.-------------- - capn_midnight

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.