WinForm Form Basic Properties

Source: Internet
Author: User

A form is a visual interface for a program to interact with a user, a form is an object, a form class defines a template that generates a form, and a form is instantiated by instantiating a form class. The form class defined in the System.Windows.Forms namespace of the NET Framework class library is the base class for all form classes.

Common Properties:

A

Layout:

autoscroll: Scroll bar is displayed when the content of the control exceeds the visible area;

Autosize: Whether the window is automatically adjusted when the contents of the control are exceeded;

Location: The coordinates of the upper-left corner of the control relative to its container;

startposition: The position of the window, center, etc.,centerscreen-Center,Manual-the upper left corner of the screen;

maximumsize: The maximum size to which the form can be adjusted;

minimumsize: The minimum size to which the form can be adjusted;

padding : The internal margin of the control;

Size: Window sizes;

WindowState : Running state, running up to minimize the maximum;

Window style:

ControlBox : The maximum minimum close button in the upper-left or upper-right corner of the form;

icon: Set the icons in the upper left corner of the form, only the ICO file;

MaximizeBox : Controls whether the Maximize button is available;

MinimizeBox : Controls whether the minimized button is available;

HelpButton: Help window (displayed only if no Maximize button and minimize button are present);

Opacity: transparency;

Showicon: Whether to display the upper left corner icon;

ShowInTaskbar : Whether to display the form in the Windows taskbar;

topmost : Topmost window, always on top

transparencykey: Which color is the color to display transparently, usually used to make transparent form

Design:

name: The class name of the form class;

Data:

Tag -user-defined data associated with the object;

Appearance:

backgroundimage : Background image;

backgroundimagelayout : background picture layout;

BackColor: Background color;

cursor : mouse style;

FormBorderStyle : Border style;

Text: title bar text;

Miscellaneous:

AcceptButton : "Accept button", each time the user presses the ENTER key is equivalent to click this button;

CancelButton : "Cancel button", each time the user presses the ENTER key is equivalent to click this button;

WinForm Form Basic Properties

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.