This part of the form is the first step in the visualization of the program, from the CMD Black window to the friendly visual interface, VS provides a brief introduction to practical design methods and procedural methods, and a large number of smart reminders that programmers save a lot of time while doing the program first of all to understand the properties of the form and common common controls. and its design operations and program operations. Event of the form: Delete event: First the event page inside of the hanging of the event deleted, and then delete the background code inside the event panel is a container 1, Label-Text Display tool: Textual value, Assignment: Lable1. Text 2, TextBox--TextBox value, Assignment: TextBox1.Text 3, RichTextBox--Text field 4, button-click event: Double-click button 5, RadioButton--radio Button checked property: Select Medium foreach (Control i in Panel1. Controls) {if (i is RadioButton) {RadioButton RA = i as RadioButton;}} If you want to group, place the same group of buttons under the same container 6, CheckBox checked property: Yes No check Tag property: can store custom data if you want to group, put the same group of buttons under the same container 7, listbox--list box display data://To the listbox specified data source Listnation.datasource = da. Select (); Specifies the value displayed listnation.displaymember = "Name"; Specifies the background value value Listnation.valuemember = "Code"; The value of the selected item: ListNation.SelectedValue.ToString () Listnation.selecteditem as nation;//the selected item, which is the entity object if more than one data check is selected: foreach (Nation data in Listnation.selecteditems) {MessageBox.Show (data. Code); } set a selection: Listnation.selectedindex =-1; Listnation.selectedvalue = "n090"; 8. combobox--drop-down list 9, Datatimepicker--Date selection Control settings selected: Datetimepicker1.value = Convert.todatetime (SJ); Datetimepicker1.text = SJ; Check value: dateTimePicker1.Value.ToString ("yyyy mm DD HH:mm:ss:ms") 10, PictureBox appearance, image can choose the image path behavior, SizeMode can set the picture size layout Way 11, Imagelist Imagelist1.images[n]; 12, NotifyIcon 13, MenuStrip 14, ContextMenuStrip 15, tooltip--mouse move in the prompt box 16, ProgressBar--progress bar value to set the progress bar current progress
C # Forms