C # Forms

Source: Internet
Author: User

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

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.