2008年9月2日

用TextBox绑定网格

摘要: //矩形帮定cb与网格方法 public void f1(object sender, EventArgs e) { this.comboBox1.Text = dataGridView1.CurrentCell.Value.ToString(); Rectangle R = dataGridView1.GetCell... 阅读全文

posted @ 2008-09-02 00:26 VictorShan 阅读(420) 评论(0) 推荐(0)

winform文本框即输即选

摘要: private void textBox2_TextChanged( object sender, EventArgs e ) { // 文本框即输即选方法一 //this.textBox2.SelectionStart = 0; 可省 this.textBox2.SelectAll(); }... 阅读全文

posted @ 2008-09-02 00:24 VictorShan 阅读(493) 评论(0) 推荐(0)

C#的四个基本技巧 (转载 出处:51cto.com整理)

摘要: 1.如果可能尽量使用接口来编程 .NET框架包括类和接口,在编写程序的时候,你可能知道正在用.NET的哪个类。然而,在这种情况下如果你用.NET支持的接口而不是它的类来编程时,代码会变得更加稳定、可用性会更高。请分析下面的代码: private void LoadList (object [] items, ListBox l) { for (int i = 0; i < items.L... 阅读全文

posted @ 2008-09-02 00:05 VictorShan 阅读(233) 评论(0) 推荐(0)

导航