Login | Register   
LinkedIn
Google+
Twitter
RSS Feed
Download our iPhone app
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   FORUMS  |   TIP BANK
Browse DevX
Sign up for e-mail newsletters from DevX


advertisement
 

Don't Be Square: Creating Non-Rectangular Windows with .NET

If you're tired of the same old rectangular boring user interfaces in your Windows programs and prefer the funky shapes of applications such as Windows Media Player 9, follow this step-by-step guide to take your applications where they have never been before.


advertisement


ne problem with creating GUIs with Microsoft Visual Studio.NET is that they all tend to look the same. It takes extra work and innovation to make your user interface stand out from the crowd, but one way to make your application distinctive is to create a non-standard shaped UI such as that used in Windows Media Player 9 (see Figure 1). You may not have realized that—thanks to the .NET framework—creating a non-rectangular UI like this is easier than it has ever been, and is well within the reach of every developer. There's no longer any need to override Windows subclasses to add your own drawing routines! The framework does it for you. In this article you'll find out how to create non-rectangular UIs, and build your own retro-style wooden application in the process. The user interface of Windows Media Player 9 begins with a basic non-rectangular form, and then adds both non-traditional buttons and traditional controls, such as the TreeView on the left, and the ListBox containing the songs on the right. These are traditional, rectangular controls, placed on the form, and colored to blend in.

In this article, and in the downloadable code, you will create a basic HTML viewer similar to Windows Media Player (though not nearly as pretty, blame my artistic skills), with a non rectangular form that contains both traditional controls and some cool circular buttons.

 
Figure 1. Windows Media Player 9: Note the non-traditional (and non-rectangular) UI, which contains both standard (TreeView, ListBox) and non-standard (circular and oval buttons) controls.
You may wonder: How do you drag the form around the screen, if you can't see its title bar? Well, you'll learn how to do that too.



Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

Sitemap
Thanks for your registration, follow us on our social networks to keep up-to-date