2017-4-26 WinForm Common Controls 2

Source: Internet
Author: User

Common Control 2:

ListBox:

(And ComboBox Difference: ComboBox is a bunch of inside can choose one, the ListBox is a bunch of inside can choose a bunch)

SelectionMode---------------------------Indicates whether the list box will be a single selection, multiple selection, or not selectable

Value:

foreach (string s in Listbox1.selecteditems)

{

MessageBox.Show (s);

}

Choose at least three:

if (listbox1.selecteditems.count<3)

{

MessageBox.Show ("Select three Minimum");

}

MaskedTextBox:

Mask-----------------------------Sets the string that controls the input allowed by this control

MonthCalendar:

Maxselectioncount-----------------------The total number of days that can be selected for the control

Value:

MessageBox.Show (monthCalendar1.SelectionStart.ToString () + "_" +monthcalendar1.selectionend.tostring ());

Selection Range:

MessageBox.Show (MonthCalendar1.SelectionRange.ToString ());

NotifyIcon: (Pallet tool)

Icon----------------------------------------icons that will be displayed in the system bar

Text--------------------------------------displayed when the mouse hovers over the icon

NumericUpDown:

Maximum-----------------------------------indicates the maximum value of the Up-down control

Minimum---------------------------------indicates the minimum value of the value Up-down control

PictureBox:

BackgroundImage-------------------------The background picture used for the control

BackgroundImageLayout-----------------background picture layout for components

ProgressBar: (progress bar)

Value-----------------------The current value of ProgressBar, within the range specified by the minimum and maximum attributes

Style-----------------------This property allows the user to set the style of the ProgressBar

Marqueeanimationspeed------------------The speed of the subtitle animation, in milliseconds

RichTextBox:

MaxLength----------------------------Specifies the maximum number of characters that can be entered in an edit control

ReadOnly------------------------------Controls whether text in an edit control can be changed

Multiline-------------------------------Controls whether the text of an edit control can span multiple lines

ScrollBars--------------------------------Defining the behavior of a control scroll bar

WordWrap------------------------------Indicates whether multiline edit control wraps automatically

Textbox:

PasswordChar--------------------------indicates that the displayed character will be entered for the password of a single-line edit control

Usesystempasswordchar---------------Indicates whether the text in the edit control is displayed with the default password characters

TOOLTIP:

Tooltiptitle-----------------------------determine the title of the ToolTip

ToolTipIcon-----------------------------Determine the icon that appears on the ToolTip

Initialdalay--------------------------------determines how long the pointer must remain stationary within the ToolTip area before the ToolTip window is displayed

ReshowDelay---------------------------------determines how long the subsequent ToolTip window will be displayed when the pointer moves from one tooltip area to another tool tip area

WebBrowser:

Point button to the address in the text box:

The code inside the button's Click event:

String S=textbox1.text;

Webbrowser1.url=new Uri (s);

2017-4-26 WinForm Common Controls 2

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.