C # practice-simple desktop Programming

Source: Internet
Author: User

In the morning, I flipped through the C # book, designed a simple Windows desktop program, and made some of the most common controls. The simplicity is simple. I 'd like to record the results ..
Used control: Label button textbox
Purpose: To enter the name and age and return the entered content
The content is very simple, but it's just an entry, ready? Go!
First, create a Windows application named numbertest.

Next, start the design, find the above control in the control list, and drag it into the form

After the control is dragged, right-click it to find the "attribute" value and modify its name and text content in the attribute list:

(Attribute example) the attribute value of the specified textboxr is: (only part of the attribute content is intercepted here)


Set the name and text of all controls in form in the above method (the name and text values correspond to the following)
Labelbox: Name text: NULL
Labelbox: Age text: NULL
Label: info text: NULL
Label: info1 text: 0
Label: result text: Condition
Button: sumit text: Submit
Button: reset text: reset
Next, double-click the "Submit" and "reset" controls and add the following code:

Running result:
Initial interface:

Submit result:

Reset result:

Conclusion: The above is my first small windows application. There are not many functions, but at least I know some basic usage of the control...

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.