advertisement
Premier Club Log In/Registration
  Include Code  Search Tips
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   SKILLBUILDING  |   TIP BANK  |   SOURCEBANK  |   FORUMS  |   NEWSLETTERS
Browse DevX
A Cool WebBrowser Control
Is There a Road to Improving the DataGrid?
The Whidbey Documentation Will Get More Accurate!
Partners & Affiliates
advertisement
CoDe Magazine
Subscribe to CoDe Magazine
Rate this item | 0 users have rated this item.
 Print Print
 
Exploring New WinForm Controls in VS .NET Whidbey
Catering to the strength of the third-party .NET component market and the power of the .NET Framework itself, Microsoft includes several powerful new WinForm controls in the Base Class Libraries for Windows application development. 

advertisement
he WinForm controls provided by the .NET Framework 1.1 are extremely useful, and the framework for developing new custom controls provided in 1.1 is very strong, but sometimes the development community expects more out-of-the box. Many needs of the development community are satisfied by the basic collection of WinForm controls while some developers have voiced their need for more functionality. Microsoft appears ready to rise to the occasion with the inclusion of many new WinForm controls.

The set of user controls that are an integral part of Microsoft's development environments provide the baseline for rapid application development (RAD). Every release of the IDE brings new controls to accelerate the development of user-friendly GUIs. Microsoft has seemed content with providing a strong set of base controls, and a framework allowing the development community and third-party Independent Software Vendors (ISVs) to tackle the really heavy lifting in developing complex controls.

Microsoft is starting to break with that strategy with Visual Studio .NET and really follows through with the new controls that appear in the Toolbox of the alpha build of Whidbey. The new controls include everything from data-centric, to layout-oriented containers, to significantly improved versions of existing controls. A few new controls plug up holes in the existing user control line-up.

It is probable that many new or improved WinForm controls covered in this article will change, perhaps dramatically, as Whidbey progresses from alpha through beta to the final release, and new controls could surface. What you can expect for sure is that the quality, ease-of-use, and RAD characteristics of the new WinForm controls will continue to increase beyond the already impressive alpha.

Simplifying Common Tasks
 
Figure 1. The StandardMainMenu Component: This component generates a MainMenu control populated with the commonly used standard Windows application menu items
Microsoft designed the .NET Framework to allow the developer to easily create either custom controls or extend existing controls to provide custom features. Although developers can easily create their own custom functionality, some tasks are so common that it is better to have a standard control that facilitates performing that task.

Enhanced Menu Options
The current MainMenu control is very useful and powerful; the in-place editing feature makes it very easy to design complex collections of menu items. One glaring omission is the left-hand image stripe that can be seen on all the menu items in the IDE, but was not available on the standard MainMenu control. The MainMenu class has been updated in Whidbey with three properties used to implement the image margin visual element: ImageList, IsImageMarginPresent, and ImageMarginColor. The new ImageList property can be set to make the desired images available for menu items, the IsImageMarginPresent property controls the visibility of the image region down the left side of any drop-down menu, and ImageMarginColor controls the color to be used for the image margin.

You will often use the same set of common menu items in many applications as a part of standard Windows application design. Common menu items include the File, Edit, and Help menus. If you often use many of these common elements, you will save time by using the StandardMainMenu component. The StandardMainMenu component on the Toolbox creates a MainMenu control, as shown in Figure 1 and will auto-populate all the standard Window menu items. From this starting point, you should delete or disable the items you do no need.

  Next Page: A Better Toolbar
Page 1: IntroductionPage 4: Finally! A Managed WebBrowser
Page 2: A Better ToolbarPage 5: New Container Controls
Page 3: A More Powerful ListViewPage 6: Miscellaneous New Features
© Copyright Component Developer Magazine and EPS Software Corp., 2006
advertisement
Advertising Info  |   Member Services  |   Permissions  |   Contact Us  |   Help  |   Feedback  |   Site Map  |   Network Map  |   About


JupiterOnlineMedia

internet.comearthweb.comDevx.commediabistro.comGraphics.com

Search:

Jupitermedia Corporation has two divisions: Jupiterimages and JupiterOnlineMedia

Jupitermedia Corporate Info


Legal Notices, Licensing, Reprints, & Permissions, Privacy Policy.

Advertise | Newsletters | Tech Jobs | Shopping | E-mail Offers