. NET Foundation Step by Step [WinForm application]

Source: Internet
Author: User

After half a load, back to the blog park, everything from the beginning, today is just the start, forgive me this life bohemian love freedom.

Get into today's theme song:WinForm Application (Introduction)

1, WinForm application is a kind of intelligent client technology, we can use the WinForm application, help us to obtain information or transfer information and so on.

2. WinForm Control Properties:

Name: In the background to get the foreground control object, you need to use the Name property.

Visible: Indicates whether a control is visible.

Enabled: Indicates whether a control is available.

3. Form objects created in the main function, which we call the main form of this form application. It also means that when you close the main form, the entire application is closed.

4. TextBox control

WordWrap: Indicates whether the text box wraps.

PasswordChar: Let the text box display a single character

Scollbars: Whether scroll bars are displayed

Event: TextChanged triggers this event when the contents of the text box change.

Timer

Do a specified thing within the specified time interval.

5, simple to remember the application

1), when the program loads, cancel the text box wrap, and let two buttons and text box hidden

2), click on the login to determine whether the landing success

3), Automatic line wrapping function

4), save the text to a specified directory.

6, radio and multi-choice

Checked: Indicates whether the control is selected.

By default, all radio buttons in a form allow only one selection and can be grouped using GroupBox.

7. Design of MDI Form

1. First, determine a parent form. Set IsMdiContainer to True.

2. Create a subform, and set their parent form.

8. Directory Operations folder

CreateDirectory Creating a Folder

Delete Deletes a folder

Move Cut Folder

Exist judge whether there is

GetFiles gets the full path of all files under the specified directory

Getdirectory get full path to all folders under the specified directory

9. ComboBox drop-down box control

DropDownStyle: Control the appearance style of the drop-down box

Name: cbo+ ....

Case: Date picker

10. Click Change image

1), when the program loads, the specified picture folder all the picture file name read into the listbox

MessageBox.Show () a variety of uses:

Functions < int > MessageBox (< string > Text, < string > Title, < integer > Ntype,messageboxicon);

The function description pops up a message box.

Syntax

Parameters:

Text < string; The body of the message box;

Title < string;, the caption of the message box;

NType < integer; the type of the message box.

Returns the value of the:< integer; The user clicks the Select button on the message box when it is closed. MessageBoxIcon: The icon style that is displayed on the dialog box.

Description

MessageBox ("Message content", "return value OK 1", messageboxbuttons.ok,messageboxicon.question);

MessageBox ("Message content", "return value OK 1 Cancel 2", Messageboxbuttons.okcancel, Messageboxicon.asterisk);

MessageBox ("Message content", "return value termination 3 Retry 4 Ignore 5", Messageboxbuttons.abortretryignore, Messageboxicon.error);

MessageBox ("Message content", "return value is 6 No 7 cancel 2", Messageboxbuttons.yesnocancel, messageboxicon.exclamation);

MessageBox ("Message content", "return value is 6 No 7", Messageboxbuttons.yesno, Messageboxicon.hand);

MessageBox ("Message content", "return value Retry 4 Cancel 2", Messageboxbuttons.retrycancel, MessageBoxIcon.Information);

MessageBoxIcon: All icon Styles

Messageboxicon.question

Messageboxicon.asterisk

MessageBoxIcon.Information

Messageboxicon.error

Messageboxicon.stop

Messageboxicon.hand

Messageboxicon.exclamation

Messageboxicon.warning

Messageboxicon.none

This article is here, and finally make a small ad: QQ Group: . NET step by Step screen number:590170361 (Dabigatran Note: Blog Park to see)

. NET Foundation Step by Step [WinForm application]

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.