WindowsForm common control menus and toolbars

Source: Internet
Author: User

Common Controls menu bar status bar layout

Common Controls

Textbox:text property: Used to get or set the text of a text box

In general, almost all of the properties in the control have the ability to get or set two functions

PasswordChar: Replace character for password-hiding effect

ComboBox: Attribute selectedindex = 0; Used to get or set the index of the selected item

SelectedText: Gets or sets the text of the selected item

SelectedItem: Gets or sets the selected item

SelectedValue: Gets or sets the value of the selected item

Items: Collection of elements, indexed, indexed starting from 0, Add,remove

DateTimePicker: Gets or sets the selected time by the Value property

Checkbox:checked property: Gets or sets whether to select

Radiobutton:checked property: Gets or sets whether to select

Checkedlistbox:selecteditem: Is the mouse selected item

Items: Item collection LinkLabel: A hyperlink-like label with a function equivalent to a button

ListBox: With CheckedListBox

One more SelectionMode. Set multiple Selections

SelectedItems Selected Items Collection

Organize 1 common controls the following is a login interface that marks the public space used

2 Password box

Inside is * * * use to the following property modification PasswordChar

Form2 f = new Form2 ()

F.show ();

3 textbox

RadioButton

Checkbox

Combox Add Remove Property

DateTimePicker

4 hash table for a moment.

5 IF ()

The Judgment statement returns a Boolean value, and the parentheses can write a Boolean value in the same way.

6 string username = txtUserName. Text.trim ();

7 CheckedListBox

For example:

 Private voidButton1_Click (Objectsender, EventArgs e) {CHECKEDLISTBOX1.ITEMS.ADD ("Zhang San"); Add CheckedListBox1.Items.Add ("John Doe"); CHECKEDLISTBOX1.ITEMS.ADD ("Harry"); }        Private voidButton2_Click (Objectsender, EventArgs e) {CheckedListBox1.Items.Remove ("John Doe"); Remove removal}Private voidButton3_Click (Objectsender, EventArgs e)                                    {listBox1.Items.Clear (); Clear Empty ListBox1.Items.Add ("Zhang San"); LISTBOX1.ITEMS.ADD ("John Doe"); LISTBOX1.ITEMS.ADD ("Harry"); LISTBOX1.ITEMS.ADD ("Zhao Liu"); LISTBOX1.ITEMS.ADD ("Tianqi"); }

8 LinkLabel

Looks like a hyperlink, but he's a button.

9 Listbox Property in SelectionMode

Attribute Selectionmod mouse Move up to a point to change back to white

10 set what is a collection

TreeView

***    ***

Menu Toolbar

1 MenuStrip menu bar with this

2

You can just change this to right-click.

It's about the right-click effect.

3 Status bar

4 ToolStrip Toolbar

For example:

You can put a textbox

5 The ToolStripContainer property has the Dock.

Layout

6 Dock fills the edge of the nearest container that contains this control

the dock in the property has a property in each control. The dock can be adjusted

7 Anchor whether the upper and lower left and right margins of the control are fixed in the layout

8 Location Start coordinates

margin specifies the distance between this control and the margin of another control

No spacing in padding space

MaximumSize Maximum Size

MinimumSize Minimum size

Size sizes

Container

The form itself is a container

9 panel is equivalent to a div

Floelayoutpanel Flow-through layout

FlowDirection Setting the layout direction

He can make the layout change

GroupBox

GroupBox is equivalent to a panel with more than a panel edge and a text

TabControl three dots below the arrow in the DOT graph

Note

There are two ways to find a control when it can't find it.

Method One

Right-click on the property and point to the small arrow in the graph

Method Two views--Other Windows--Document Outline

That's what she looks like.

Note that when it comes to not running, it's new when you just remove it.

WindowsForm common control menus and toolbars

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.