This is the 12th day of my participation in the January Gwen Challenge. Check out the event details: The last Gwen Challenge 2021

preface

Blogger, this article covers the control of the application form of several commonly used c #, this a few controls is particularly high in c # using the frequency of the application form, if you learn c # application form for the first time, this article is especially suitable for, because it is simply to teach you how to do, if you need to explore, this control can go to see a special explanation to this a control, Bloggers this article is suitable for new learning, for just learning C# forms application of children’s shoes, this article is not very difficult to understand, bloggers will teach hand by hand, from the creation of files to teach, if you are interested in C# forms file can look. Hahaha, don’t spray if you don’t like it.

Daily learning

Create a forms application file

Bloggers are using Visual Studio 2019, without the software of students can go to the Microsoft website to download (visualstudio.microsoft.com/zh-hans/dow…). Now the version is 2022, download the community edition and sign in, because the community edition is free, but if you have only the VS version is different from the blogger’s, it doesn’t matter, the creation steps are basically the same.

Note: It is important to note that when we create the file, we select the Windouse Forms application file with the (.net Framework) suffix

Set the project name, solution name, the two names can be different, and file location, frame.

Successful creation, as shown in the following figure:

Note: The first time you create a form application, you may not know where the toolbox is, in the view toolbox, if you find no, you have to go to see if your file was created incorrectly.

Background code, as shown below:

1. Button Button usage

Button Button is a very common control, if we need to write the specific method of the Button double click the Button will automatically generate trigger events and functions

2. Check the CheckBox

The CheckBox CheckBox is a separate control each

3. CheckedListBox Check list box

The checklist box differs from the CheckBox in that this is a control, equivalent to a collection of checkboxes

RadioButton 4

5. ComboBox drop-down box

The dropdown if we don’t set the default value you’ll see it blank when you run it, so you have to choose, Text will set the default value

6. DateTimePicker Date box

The date box doesn’t need to be set, drag it over and you can use it directly, but the effect can only be reflected at run time, right

DateTimePicker DateTimePicker

7. The Label text

You can’t edit text directly in a form application. You can only have text in the Label control. You can also assign values to it in your code

LinkLabel hyperlink

The LinkLabel hyperlink is a hyperlink control that automatically generates events and functions by double-clicking

9. The ListBox

The ListBox is similar to the text box, but there is a difference. The ListBox needs to set its own value in advance, and the text box can be entered.

10. A TextBox

TextBox Text box can be input in a form application or used as an output medium. When we process Text in code, it will be displayed automatically.

conclusion

Blogger is simply explained the c # application form several very common control, simple operation, for the code, you can focus on blogger later, may be out to a control’s explanation, this article blogger is equivalent to take us into the door, not what all don’t understand, bloggers write each step is a very clear, As long as we carefully look at the figure, according to the steps on the figure to do it, drag out the effect you want, if you still do not understand can be private letter to the blogger, the blogger will tell you, not the blogger check information will teach you, well, creation is not easy, I hope you like, attention, comments, collection oh!!