Introducing .Net Windows Forms

.Net Windows Forms is the overall structure to create windows client applications. The .Net Windows Forms is similar to the client applications created through Visual Basic. The only difference is that in .Net Windows Forms you can make use of all the features of .Net Framework such as Common Language Runtime (CLR), XML Web Services, ActiveX control, and meta-data.

While designing .Net Windows Forms, the three main things to consider are Forms, Controls, and Events. The Form is a class that represents any window in your application. While designing the user interface of the application, the class that is created is being derived from Form class. You can use the Form class to create standard, tool, borderless, floating, and modal windows. You can also create Multiple Document Interface (MDI) forms using the Form class. In Multiple Document Interface forms there can be more than one form within its client area.

The Controls in .Net Windows Forms are components such as Text field, Submit button, Checkbox, and Radio button that makes your application interactive. Apart from all of the Controls used in .Net Windows Forms, you can make use of custom controls like DataGrid. The .Net Windows Forms provide very limited restriction to Controls as far as setting the properties of Controls is concerned. Moreover, the state of Controls in .Net Windows Forms is stateless that prohibit them from being updated.

The programming model of .Net Windows Forms are event based. This means that when the control such as a button changes its state, an event is raised. In order to handle the event in .Net Windows Forms you create a event-handles for that control. The event has two supporting classes such as EventHandler and EventArgs. The EventHandler class is used to register the event-handling method. The EventArgs class contains data about the event that is raised. You can also handle multiple events with a single event handling method.

You can also localize your .Net Windows Forms. By localization we mean that you can translate strings in your application to different languages. In Visual Studio.NET, Windows Forms Designer is the localization tool.



“Amazon and the Amazon logo are trademarks of Amazon.com, Inc. or its affiliates.”

| Privacy Policy for www.dotnet-guide.com | Disclosure | Contact |

Copyright - © 2004 - 2024 - All Rights Reserved.