摘要:
先上图:说明,当单击button1时,线程休息10秒钟。但button2也可以继续响应。代码如下:View Code 1publicpartialclassForm3:Form2{3publicForm3()4{5InitializeComponent();678}9privatevoidsleep()10{1112Thread.Sleep(10*1000);13Console.WriteLine("fdfdf线程50");14}1516privatevoidbutton1_Click(objectsender,EventArgse)17{18ActionsleepActi 阅读全文
摘要:
1伍华聪2牛人空间--界面布局 阅读全文
摘要:
先上图。代码如下:View Code 1privatevoiddataGridView1_RowPostPaint(objectsender,DataGridViewRowPostPaintEventArgse)2{3vardgv=(DataGridView)sender;4if(dgv.RowHeadersVisible)5{6Rectanglerect=newRectangle(e.RowBounds.Left,e.RowBounds.Top,7dgv.RowHeadersWidth,e.RowBounds.Height);8rect.Inflate(-2,-2);9TextRender. 阅读全文
摘要:
1,先上图代码如下。View Code 1privateAutoCompleteStringCollectionautoCompleteSource=newAutoCompleteStringCollection();23privatevoiddataGridView1_EditingControlShowing(objectsender,DataGridViewEditingControlShowingEventArgse)4{5DataGridViewdgv=(DataGridView)sender;6if(e.ControlisTextBox)7{8TextBoxtb=(TextBox. 阅读全文
摘要:
1.关于 datetimepicker.Text 如果赋值给该属性的值不能转化为时间类型,那么赋值将失败。有效的解决办法可以参照如下代码;View Code 1CultureInfoci=newCultureInfo("zh-cn");2stringdtpText=dtp.Text;3if(dtpText=="")4{5vardtOther=DateTime.Now;6stringmonth=dtOther.ToString("MM",ci);7stringday=dtOther.ToString("dd",ci) 阅读全文