02 2014 档案
摘要:1、如果你能做的事,员工也能做,就让员工做好了。2、代码是一行一行执行的。3、如果你找不到NB的人,那就找勤奋点的人。
阅读全文
摘要:http://blog.csdn.net/useruse/article/details/5602495
阅读全文
摘要:1、SqlDataAdapter内部通过SqlDataReader获取数据,而默认情况下SqlDataReader不能获知其查询语句对应的数据库表名,所以下面的代码:string strConn,strSQL;strConn=@"DataSource=.\SQLEXPRESS;"+"Initial Catalog=Northwind;Integrated Security=True;";strSql="SELECT CustomerID,CompanyName FROM Customers";SqlDataAdapter da=new
阅读全文
摘要:private void button1_Click(object sender, EventArgs e) { this.textBox1.Text = "1"; this.Invoke(new EventHandler(delegate { this.textBox1.Text += "2"; })); this.textBox1.Text += "3"; }结果为:123 private void button1_Click(object sender, Even...
阅读全文
摘要:我们可能经常会用到 Thread.Sleep 函数来使线程挂起一段时间。那么你有没有正确的理解这个函数的用法呢?思考下面这两个问题:1、假设现在是 2008-4-7 12:00:00.000,如果我调用一下 Thread.Sleep(1000) ,在 2008-4-7 12:00:01.000 的时候,这个线程会 不会被唤醒?2、某人的代码中用了一句看似莫明其妙的话:Thread.Sleep(0) 。既然是 Sleep 0 毫秒,那么他跟去掉这句代码相比,有啥区别么?我们先回顾一下操作系统原理。操作系统中,CPU竞争有很多种策略。Unix系统使用的是时间片算法,而Windows则属于抢占式的。
阅读全文
摘要:FormBorderStyle等于System.Windows.Forms.FormBorderStyle.None的窗体,点击任务栏图标的时候,是不能象标准窗体那样最小化或还原的。protected override CreateParams CreateParams { get { const int WS_MINIMIZEBOX = 0x00020000;// Winuser.h中定义 CreateParams cp = base.CreateParams; cp.Style = cp.Style | WS_MINIMIZEBOX;// 允许最小化...
阅读全文
摘要:this.FormBorderStyle = FormBorderStyle.None; this.MaximumSize = new Size(Screen.PrimaryScreen.WorkingArea.Width, Screen.PrimaryScreen.WorkingArea.Height); this.WindowState = FormWindowState.Maximized;转自:http://wisecn.blog.163.com/blog/static/19755864520120644738257/
阅读全文