Use Visual C # To compile a Windows Application

Source: Internet
Author: User
Use Visual C # To compile Windows Applications Program The process can be divided into the following steps:
(1) Use the controls in the Form Designer and the Windows Forms control group to design the application interface.
(2) design the properties of windows and controls.
(3) Compile the event Method Code .

Windows applications are based on forms. 1 . Common Attribute   (1) Name attribute: used to obtain or set the name of the form. (2) windowstate attribute: used to obtain or set the window state of a form. (3) startposition attribute: used to obtain or set the start position of the form during running. (4) text attribute: This attribute is a string attribute used to set or return the text displayed in the title bar of the window.

(5) width attribute: used to obtain or set the width of the form. (6) heigth attribute: used to obtain or set the height of the form. (7) left attribute: used to obtain or set the X coordinate of the left edge of the form (in pixels ). (8) Top attribute: used to obtain or set the Y coordinate of the upper edge of the form (in pixels ). (9) controlbox attribute: used to obtain or set a value that indicates whether the control box is displayed in the title bar of the form. (10) maximumbox attribute: used to obtain or set a value indicating whether to display the maximize button in the title bar of the form.

(11) minimizebox attribute: used to obtain or set a value indicating whether to display the minimization button in the title bar of the form. (12) acceptbutton attribute: This attribute is used to obtain or set a value. The value is the name of a button. When you press enter, it is equivalent to clicking this button on the form. (13) cancelbutton attribute: This attribute is used to obtain or set a value. The value is the name of a button. When you press the ESC key, it is equivalent to clicking the button on the form. (14) model attribute: This attribute is used to set whether the form has a mode display form. (15) activecontrol attribute: used to obtain or set the Active Control in the container control. (16) activemdichild attribute: used to obtain the current active subwindow of the Multi-Document Interface (MDI.

(17) autoscroll attribute: used to obtain or set a value that indicates whether the form is automatically rolled. (18) backcolor attribute: used to obtain or set the background color of the form. (19) backgroundimage attribute: used to obtain or set the background image of the form. (20) enabled attribute: used to obtain or set a value that indicates whether the control can respond to user interaction. (21) font attribute: used to obtain or set the font of the text displayed by the control. (22) forecolor attribute: used to obtain or set the foreground color of the control. (23) ismdichild attribute: gets a value indicating whether the form is a multi-Document Interface (MDI) subform. (24) ismdicontainer attribute: gets or sets a value that indicates whether the form is a container of a child form in Multi-Document Interface (MDI. (25) keypreview attribute: This attribute is used to obtain or set a value that indicates whether the form will receive the event before passing the key event to the control with focus. ( 26) mdichil.pdf attribute: array attribute. (27) mdiparent attribute: This attribute is used to obtain or set the current multi-Document Interface (MDI) parent form of the form. (28) showintaskbar attribute: This attribute is used to obtain or set a value indicating whether a form is displayed in the Windows taskbar. (29) visible property: This property gets or sets a value that indicates whether the form or control is displayed. (30) Capture property: If this property value is true, the mouse is limited to the response of this control, regardless of whether the mouse is within the control range.

(1) show method the function of this method is to display the form. The call format is: form name. show (); (2) Hide method the function of this method is to hide the form, the call format is: form name. hide (); (3) Refresh method the function of this method is to refresh and redraw the form, the call format is: form name. refresh (); (4) Activate Method The function of this method is to activate the form and give it focus. The call format is: Form name. Activate (); (5) Close method this method is used to close the form. The call format is: form name. Close (); (6) showdialog. The function of this method is to display the form as a mode dialog box. The call format is: form name. showdialog ();
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.