Introduction to Windows Forms

zhaozj2021-02-17  54

Windows Forms (Windows Forms) is a new form package that enables developers to create a Windows-based application to make full use of rich user interface features in the Microsoft Windows operating system. Windows Forms is part of the new Microsoft .NET Framework that uses many new technologies, including a public application framework, controlled execution environment, integrated security, and object-oriented design principles. In addition, Windows Forms fully supports fast and easy connection to XML network services and creates a rich, data-aware application based on the ADO.NET data model. With a new shared development environment in Visual Studio, developers can use any language that supports .NET platform, including Microsoft Visual Basic and C # to create a Windows Forms application. Creating a Windows Forms Application Developer Create a Windows Forms application like today's Visual Basic-based form (although use Windows Forms, they can use all languages ​​in Visual Studio, not just in Visual Basic. productive forces). In the image below, you can see the design surface to be visually used to arrange the layout of the form with a variety of controls. To edit the source code, the developer only needs to double-click a control, then the source code will be displayed, which allows the user to quickly access all event models of the controls and forms. Figure 1. Creating a Visual Inheritance visualization set inheritance is an important new feature in Windows Forms, which will increase the productivity of the developer and promote the reuse of the code. For example, an organization can define a basic form that includes a standard, such as a company logo, possibly include a public toolbar and other items. This form can be used by the developer by inheritance, and expands to meet the needs of a particular application, while simultaneous use of a public user interface. The creator of the basic form can specify which elements can be extended, which elements must be used as it can be used to ensure that the form can be properly reused. Accurate Form Design When developers designed the look and feel of the Windows Forms application, they will have an unprecedented level of control capabilities and productivity. Menu Designer, Control Anchoring, Control Docking, and Other Features Make developers more accurately create Windows-based user interfaces. With the menu designer, developers can add menus to the form quickly and easily, modify the menu, and then view the appearance of the menu without allowing applications. With the control anchor, the control on the form will be more efficient, so that the form can automatically adjust the size of the control in the user adjustment form. With form docking features, the control can stop in any side of the form, thereby providing greater flexibility in layout. Figure 2. Control Anchoring You can use an existing ActiveX control, and they can run on any form, which can protect in the prior art input. New Controls - Includes Link Label, Tray Icon, Print Preview - provides additional general features for developers. Link Label provides links to a specific URL similar to HTML. The text displayed using this control will appear underline, and when the mouse is moved above, the cursor will turn a hand, which will cause a movable event when it is clicked.

转载请注明原文地址:https://www.9cbs.com/read-30616.html

New Post(0)