K & K Consulting    K & K Consulting

K&K Home VB Guru Home Search VB Site VB Code VB Tips VB Tutorials VB Questions

K&K Home
VB Home


Microsoft Windows Forms


Introducing Windows Forms

With all of the current talk about the Web, it may appear that the Microsoft® Visual Studio® development system has de-emphasized support for building traditional Windows®-based applications. Actually, Microsoft is investing heavily in Windows-based application development.

Windows Forms is a new forms package that enables developers building Windows-based applications to take full advantage of the rich user interface features available in the Microsoft Windows operating system. Windows Forms is part of the new Microsoft .NET platform and leverages many new technologies including a common application framework, managed execution environment, integrated security, and object-oriented design principles. In addition, Windows Forms offers full support for quickly and easily connecting to Web Services and building rich, data-aware applications based on the ADO+ data model. With the new shared development environment in Visual Studio, developers will be able to create Windows Forms applications using any of the languages supporting the .NET platform, including Microsoft Visual Basic® and C#.

Creating a Windows Forms Application

Developers will create Windows Forms applications much like they do Visual Basic-based forms today (although with Windows Forms, they get the same level of productivity in all of the languages in Visual Studio, not just Visual Basic). In the following image, you can see that a design surface is used to visually lay out the form with rich controls. To edit source code, developers simply double-click a control and the source editor will appear, enabling quick access to the full event model for the control and form.

Building Windows Forms

Figure 1. Building Windows Forms

Visual Inheritance

Visual inheritance is one of the key new features available in Windows Forms that will enhance developer productivity and facilitate code reuse. For example, an organization could define a standard base form that contains items such as the corporate logo and perhaps a common toolbar. This form can be used by developers through inheritance and extended to meet the requirements of specific applications while promoting a common user interface across the organization. The creator of the base form can specify which elements can be extended and which must be used as is, ensuring that the form is reused appropriately.

Precision Form Design

Developers will have an unprecedented level of control and productivity when designing the look and feel of their Windows Forms applications. Features such as the In-Place Menu Editor, Control Anchoring, Control Docking, and many new controls enable a higher level of power and precision for developers building rich Windows-based user interfaces.

With the In-Place Menu Editor, developers can quickly and easily add menus to a form, modify them, and view how they look without having to run the application. Controls on the form are more effective with Control Anchoring, enabling a form to automatically resize controls as a user resizes the form. With Control Docking, controls can be docked on any side of a form, providing greater flexibility in layout.

In-place Menu Editor

Figure 2. In-place Menu Editor

Existing ActiveX® controls can be leveraged and run on any form as well, preserving investments in existing technologies.

New controls-including Link Label, Tray Icon, and Print Preview-provide additional common functionality for developers. Link Label provides HTML-like linking to a specified URL. Text displayed using this control will appear underlined and the cursor will change to a hand as the mouse moves over it, firing an actionable event when clicked. Tray Icon enables developers to create applications that run in the Windows tray similar to the Microsoft SQL Server™ Service Manager. Windows Forms offers a printing framework that makes printing simple, including a Print Preview window with the Print Preview control.

Developers can build applications that support the broadest audience of users with Windows Forms. Windows Forms controls implement Microsoft Active Accessibility® programming interfaces, making it straightforward to build applications that support accessibility aids such as screen readers.

Powerful Graphics

Windows Forms applications take advantage of GDI+, providing richer image control including support for more image formats. Developers will be able to easily access high-end graphics features such as alpha blending, manipulating gradients consistency, double-buffering of the OnPaint event, and the transparent and layered windows enabled by Windows 2000. With these features, developers can create richer, more complex graphical applications that have the performance customers demand.

Lower Total Cost of Ownership

Windows Forms provides more than just a great way to build rich Windows-based applications. Developers also benefit from easy deployment capabilities and an integrated application security model. Windows Forms takes advantage of the versioning and deployment features of the Microsoft .NET platform to offer reduced deployment costs and higher application robustness over time. This significantly lowers the maintenance costs (total cost of ownership) for applications written in Windows Forms.

With a Windows Forms application, there is no need to deploy an application to the end user's desktop. Instead, a user can invoke the application simply by typing a URL in a browser. The application will download to the client machine, run in a secure execution environment, and remove itself upon completion.

For organizations that want to physically deploy an application to the desktop, there is no need to go through a resource-consuming installation process. Simply copy the application to the desktop and it will be ready to go. Windows Forms provides the flexibility to make applications available to end users in the way that is appropriate for your business.


Windows Forms provides developers with a rich set of technologies for building Windows-based applications. Not only are there new controls and features for fine-tuning the user interface, but Windows Forms also provides flexible deployment and integrated security. Developers building Windows-based applications will be more productive than ever with Windows Forms.


Reprinted from the Microsoft .Net home page


Send mail to WebMaster with questions or comments about this web site.
This website is best viewed with a screen resolution of 800*600 or better.
This website is optimized for Microsoft Internet Explorer 6.x
K&K Consulting, Proud to be a Microsoft Business Partner.
Last modified: January 31, 2002