C # Windows Programmer Learning-2

Source: Internet
Author: User

1 usingSystem;2 usingSystem.Collections.Generic;3 usingSystem.ComponentModel;4 usingSystem.Data;5 usingSystem.Drawing;6 usingSystem.Linq;7 usingSystem.Text;8 usingSystem.Threading.Tasks;9 usingSystem.Windows.Forms;Ten  One namespaceproj_92 A { -      Public Partial classForm1:form -     { the          PublicForm1 () -         { - InitializeComponent (); -         } +  -         Private voidForm1_Load (Objectsender, EventArgs e) +         { ACHECKEDLISTBOX1.ITEMS.ADD ("China"); CHECKEDLISTBOX1.ITEMS.ADD ("United States"); atCHECKEDLISTBOX1.ITEMS.ADD ("Russia"); CHECKEDLISTBOX1.ITEMS.ADD ("United Kingdom"); -CHECKEDLISTBOX1.ITEMS.ADD ("France"); Checkedlistbox1.checkonclick =true; -TextBox1.Text = DateTime.Now.ToString ("H:mm:ss"); -Timer1. Enabled =true; -Timer1. Interval = -; -  inHscrollbar1.maximum = -; Hscrollbar1.minimum =0; -Hscrollbar1.smallchange =2; Hscrollbar1.largechange =5; toVscrollbar1.maximum = -; Vscrollbar1.minimum =0; +Vscrollbar1.smallchange =2; Vscrollbar1.largechange =5; -Hscrollbar1.value =0; Vscrollbar1.value =0; the  *Datetimepicker1.format =Datetimepickerformat.long; $Datetimepicker1.showcheckbox =true;Panax NotoginsengDatetimepicker1.showupdown =false; -TextBox3.Text =""; the  +Linklabel1.linkcolor =Color.Blue; ALinklabel1.activelinkcolor =Color.green; the  +  -         } $  $         Private voidButton1_Click (Objectsender, EventArgs e) -         { -             foreach(ObjectIteminchCheckedListBox1. CheckedItems) the             { - LISTBOX1.ITEMS.ADD (item);Wuyi             } the         } -  Wu         Private voidTimer1_Tick (Objectsender, EventArgs e) -         { AboutTextBox1.Text = DateTime.Now.ToString ("H:mm:ss"); $  -         } -  -         Private voidHscrollbar1_scroll (Objectsender, ScrollEventArgs e) A         { +TextBox2.Text = hScrollBar1.Value.ToString ("D"); theVscrollbar1.value =Hscrollbar1.value; -         } $  the         Private voidVscrollbar1_scroll (Objectsender, ScrollEventArgs e) the         { theTextBox2.Text = vScrollBar1.Value.ToString ("D"); theHscrollbar1.value =Vscrollbar1.value; -         } in  the         Private voidButton2_Click (Objectsender, EventArgs e) the         { About             if(Convert. ToInt16 (TextBox2. Text) >=0&& Convert. ToInt16 (TextBox2. Text) <= - ) the             { theHscrollbar1.value =convert.toint16 (TextBox2.Text); theVscrollbar1.value =convert.toint16 (TextBox2.Text); +             } -         } the Bayi         Private voidDatetimepicker1_valuechanged (Objectsender, EventArgs e) the         { theTextBox3.Text = dateTimePicker1.Value.ToString ("yyyy. MM.DD Hh:mm:ss"); -         } -  the         Private voidLinklabel1_linkclicked (Objectsender, LinkLabelLinkClickedEventArgs e) the         { theSystem.Diagnostics.Process.Start ("http://blog.sina.com.cn/s/articlelist_2379298071_0_1.html"); the         } -     } the}

List control with check box, Timer control, scroll bar control, month calendar control, datetime control, Hyperlink control

C # Windows Programmer Learning-2

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.