Background: I caught a cold as soon as I passed the final exam. My throat is so hot and uncomfortable. However, when I think of learning and summarizing it, I will be able to get started. There are not many tutorials on the Winform console. Most of them are self-learned on the Internet, and most of them are familiar with it, if you do not sum up, it is easy to forget. One task of winter vacation is to summarize the knowledge learned this year.
Common controls: show pictures and mix faces first
Control List]
Button
TextBox
RichTextBox
Checkbox
RadioButton
Lable
ComboBox
Panle
ProgressBar
OpenFileDialog
SaveFileDialog
Timer
[Control Introduction]
1. button
The most common buttons are Text, Visible, Anchor, and Click events.
2. textBox
TextBox controls are commonly used in the following scenarios: Text, Visible, Enable, ReadOnly, PasswordChar, Multiline, and TextChanged events (ASP. NET does not have this event ).
ReadOnly attribute: whether it is read-only. For users, it can only be read and written, but the program can be read and written.
PasswordChar attribute: the password display character of the single-line editing control, that is, the replacement character displayed when the password is lost. The Text contains the actual input content. Remember to use it in a single row.
Multiline attribute: whether multi-line text is supported, that is, multi-line display content, with a line break.
TextChanged event: the event triggered when the content in Text changes to process user input characters.
3. richTextBox
Rich text editing box. Well, this is a lot of content. I will write it later. I will finish writing it simply ......
4. checkBox
Check box: You can select multiple items in all check boxes. The Text attribute is the Text content displayed in the corresponding check box. The Checked attribute also determines whether the CheckedChanged event is selected. The CheckedChanged event is triggered after the Checked attribute is changed.
5. radioButton
Single rule: You can only select one option for all single items. common attributes, events, and check boxes are the same, but the rule changes.
6. lable
Is a control that displays content. It is mainly used to mark the content and display information of other controls.
7. comboBox
The drop-down menu is clearly explained, but the operation format is different from the appearance. to display the drop-down menu, you need to set the DropDownStyle attribute to the DropDownList style, no ASP was found at the beginning of contact. the DropDownList control in. NET. There is also an Items attribute, which stores the displayed content.
8. panle
It is a container that facilitates layout. The controls in it are placed with panle as the reference layout.
9. progressBar
Common progress bars mainly use the Mininum attribute, lower limit, Maximum attribute, upper limit, Value attribute, and current Value. Use these three attributes to control the progress of the progress bar.
10. openFileDialog
Open File Dialog Box: selects the File to be opened, returns the path of the selected File, and processes the selected File with the File class.
For example, you can set the file types supported by the Filter attribute filtering. The filtering settings are as follows.
Multiselect attributes control whether multiple files can be selected.
If (openFileDialog1.ShowDialog () = DialogResult. OK) {string [] paths = openFileDialog1.FileNames; // ...... various processing}
11. saveFileDialog
Save file dialog box: It is similar to the open file dialog box. To save the file name and type, select the corresponding path. However, the background processing is required.
13. timer
Timer: Interval attribute, Tick event.
The Interval attribute is used to set the next execution Interval of a timer. The unit is milliseconds. The default value is 100. The Tick event is the content to be executed. The Start and Stop methods are used to set the Start and Stop timers.
In case of any errors, I hope Daniel can correct them ......