随笔分类 - .NET WinForm开发
摘要:我们在做winform应用的时候,大部分情况下都会碰到使用多线程控制界面上控件信息的问题。然而我们并不能用传统方法来做这个问题,下面我将详细的介绍。首先来看传统方法:运行这段代码,我们会看到系统抛出一个异常:Cross-thread operation not valid:Control 'textBox1' accessed from a thread other than the thread...
阅读全文
摘要:第一种: 下拉框动态赋值:private void Form1_Load(object sender, EventArgs e) { //获取数据源list this.Column1.DataSource = list; this.Column1.DisplayMember = ""; this.Column1.ValueMember = ""; }private DataGridViewCom...
阅读全文
摘要:获取DataGridView中单元格的坐标 Code highlighting produced by Actipro CodeHighlighter (freeware) http://www.CodeHighlighter.com/ --> int x = dgAddMatInZSInfo.GetCellDisplayRectangle(e.ColumnIndex, e.RowIndex...
阅读全文

浙公网安备 33010602011771号