. NET Daily Summary

Source: Internet
Author: User

Property:

Accepbutton: The button is executed when the ENTER key is pressed (OK).

Canclebutton: button is executed when ESC is pressed (cancel).

MinimizeBox: Used to set whether the Minimize button appears on the form.

MaximizeBox: Used to set whether the form will appear with the Maximize button.

Minimizesize: Used to set the minimum size that a form can achieve.

Maximizesize: Used to set the maximum size that a form can achieve.

Topmost: Used to feel whether the form is a sticky form.

StartPosition: Used to set the starting position of the form display. (Centerscreen: Screen Center)

WordWrap: This property determines the size of the display area that the text changes in the vertical direction.

MultiLine: Used to set whether the text box space is displayed in a single row or multiple lines. (False by default)

ScrollBars: Used to specify whether scroll bars are displayed in a multiline text box. (1. None: No scroll bar 2.Horizontal: horizontal scrollbar [Wordwrap-false] 3.Vetical: Vertical scrollbar 4.Both: horizontal and vertical scroll bars appear simultaneously [Wordwrap-false].

MaxLength: Used to set the maximum number of characters that can be entered in a text box.

PasswordChar: Used to set the character (*) to be displayed in the text box as a text box.

Method:

Focus (); Causes the form to lose focus.

Show (); Use to display the form so that the form is visible.

ShowDialog (); Displays the form as a modal Box dialog box.

Event:

Click: When the object is clicked by the mouse.

Doubleclick: When the object is double-clicked by the mouse.

GotFocus: Occurs when the object gets focus.

LostFocus: Occurs when an object loses focus.

MouseDown: Occurs when the user presses the mouse over an object.

MouseEnter: Occurs when the mouse pointer enters the object.

MouseHover: The mouse pointer stays on the object.

MouseLeave: Occurs when the mouse pointer leaves the object.

MouseMove: Occurs when the mouse pointer moves over an object.

Mouseup: Occurs when the user releases the mouse button on an object.

Other:

Button1. Text= "OK (&o)": Button hotkey.

MessageBox.Show ("message dialog box", "Two Buttons", Messageboxbuttons.okcancel).

MessageBox.Show ("message dialog box", "Three Buttons", MessageBoxButtons. Abortretryignore);

MessageBox.Show ("message dialog box", "with Icon", messageboxbuttons.ok,messageboxicon.error);

. NET Daily Summary

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.