效果图: 同时滚动和选中两个DGV的行。 关键代码: using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; using System.Reflection; namespace Sync...【阅读全文】
C#禁用numericUpDown控件鼠标中键滚轮消息响应numericUpDown_roadgain.MouseWheel += new MouseEventHandler(Num_DiscountAmount_MouseWheel);private void Num_DiscountAmount_MouseWheel(object sender, MouseEventArgs e){ HandledMouseEventArgs h = e as HandledMouseEventArgs; if ...【阅读全文】
1、我们选择用for循环, for(int i=0;i<list.count;i++) { if(list[i]) { list.RemoveAt(i); } } 如果这样循环,肯定不对, {A B C D E F G H} 假设当前遍历到D(i=3),移除,接着遍历i=4(F), ...【阅读全文】