C # controls

Source: Internet
Author: User
Most controls in. NET are derived from system. Windows. Forms. Control. This type defines the basic functions of controls. Some controls are also customized or derived from system. Windows. Forms. usercontrol. This type provides the functions required for creating controls. The controls used to design the Web UI are derived from another system. Web. UI. Control.

Anchor and dock adequacy
Anchor: used to specify how the control should respond when the user uses the reset function to set the size of the window. You can specify that if the control is reset to the size, it will be set in the border of the root control, or its size will not change, however, the border of the root sector window determines its position.
Dock accessibility: used to park the specified control in the container's hosts box. If you reset the window size with the cursor, the control will park the cursor in the window's cursor box.

ControlCommon adequacy

Anchor

Specifies how the control responds when the container size of the control changes

Backcolor

Control background color

Bottom

The bottom of the control is different from that of the worker window.

Dock

Make the control part in the dialog box

Enable

Available or not

Forecolor

Control foreground

Height

The distance from the bottom to the bottom of the widget

Left

The distance between the left border of the control and the left border of the window

Name

Control name

Parent

Control parent Control

Right

The distance from the right border of the control to the left border of the window

Tabindex

Controls in the container are sorted in the descending order

Tabstop

Whether the control can be usedTabFAQs

Tag

This value is usually not used by the control, and the control information is stored in the control. PassWindows formWhen the designer gives this parameter value, it can only give it a string value.

Top

The distance between the widget's cursor and the cursor in the upper window

Visible

Whether the control is visible during the running period

Width

Controls


ControlCommon events

Click

This event is triggered when a single widget is used. In some cases, this event will also be triggered when the driver is pressed for a response.

Doubleclik

Development

Dragdrop

When the drag-and-drop operation is completed

Dragenter

Triggered when the dragged object enters the control's border

Dragleave

Triggered when the dragged object moves out of the control's border

Dragover

Triggered when the dragged object is placed on the control

Keydown

When the control has focus, the event is triggered when the control is pressed.

Keypress

keydown later, keyup previous release.

keydown and keypress the difference is keydown keypress send the cursor char value

Keyup

When the control has a focus, the event is triggered when the cursor is placed. This event is always a cityKeydownAndKeypressPost-launch

Gotfocus

Triggered when the control receives the Focal Point

Lostfocus

Triggered when the control loses its focus.

Mousedown

When the mouse pointer points to a control and the mouse pointer is pressed. AndClickThe events are different because the events are triggered after the listener is pressed and not released.Mousedown

Mousemove

Trigger when the mouse is sliding over the control

Mouseup

The mouse pointer is positioned on the control, and the mouse pointer is triggered when the mouse cursor is placed

Paint

Development

validated

causesvalidation reserved settings: true . When the control gets its focus, this event is triggered.

in validationg triggered after the event, indicating that the validity certificate has been completed

Validating

WhenCausesvalidationAttribute settingsTrueWhen the control gets its focus, the event is triggered.

Note that the control to be verified is the control that loses focus, rather than the control that gains focus.

Control Board:
In VS 2005, the window designer uses the preview widget interface and uses the capture widget to locate the widget so that the widget is arranged in an integral manner. Set this parameter in the layout mode of the Windows Forms designer menu selected by tools> options.

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.