随笔分类 -  WinFrom

WinFrom(C/S)
摘要:参考地址:http://topic.csdn.net/u/20100225/13/34310e66-4de2-4293-ac89-a8cee1accf7a.html参考代码: 1 private void Form1_Load(object sender, EventArgs e) 2 { 3 this.dataGridView1.Columns.Add("a", "a"); 4 this.dataGridView1.Columns.Add("b", "b"); 5 this.dataGridView1.C... 阅读全文
posted @ 2013-05-15 23:05 云中雀 阅读(2373) 评论(0) 推荐(0)
摘要:http://www.cnblogs.com/peterzb/archive/2009/05/29/1491891.html 阅读全文
posted @ 2013-05-15 19:12 云中雀 阅读(158) 评论(0) 推荐(0)
摘要:http://www.cnblogs.com/wuhuacong/archive/2011/06/30/2095080.html 阅读全文
posted @ 2013-05-15 19:11 云中雀 阅读(157) 评论(0) 推荐(0)
摘要:http://www.cnblogs.com/tracky/archive/2013/03/30/2991083.html 阅读全文
posted @ 2013-05-14 21:09 云中雀 阅读(278) 评论(0) 推荐(0)
摘要:WinForm 之Control.Invoke 和Control.BeginInvoke 方法的使用Control 不能在创建它的 Thread 之外被调用。但可以通过 invoke 来保证 Control 线程安全。在跨线程更新的时候,Control 会检查 CurrentThread 是否为创建 Control 的线程,并报错!示例代码如下:private void btnStart_Click(object sender, EventArgs e){ //注意:特地不使用 Timer 控件 Thread thread = new Thread(Fun); thre... 阅读全文
posted @ 2013-05-14 19:42 云中雀 阅读(1839) 评论(0) 推荐(0)
摘要:在WINForm开发过程中,我们经常遇到填充比较多的数据到界面时,有时候界面卡死啦,这时候我们最好的办法是采用线程来对数据进行收集,然后再体现在界面上。1.第一种是比较繁琐的采用异步进行操作。创建一个委托:private delegate List<string> UpdateUIDelegate(int count);制定委托方法:UpdateUIDelegate ui = GetData; //收集数据的方法 private List<string> GetData(int count) { List<stri... 阅读全文
posted @ 2013-05-14 19:25 云中雀 阅读(556) 评论(0) 推荐(0)
摘要:1 using System; 2 using System.Collections.Generic; 3 using System.ComponentModel; 4 using System.Data; 5 using System.Drawing; 6 using System.Linq; 7 using System.Text; 8 using System.Windows.Forms; 9 10 namespace CallBackTest11 {12 public partial class Form1 : Form13 {14 public Fo... 阅读全文
posted @ 2013-05-14 19:15 云中雀 阅读(1932) 评论(0) 推荐(0)
摘要:方式一:单进程的实现View Code 1 static class Program 2 { 3 /// <summary> 4 /// 应用程序的主入口点。 5 /// </summary> 6 [STAThread] 7 static void Main() 8 { 9 Application.EnableVisualStyles();10 Application.SetCompatibleTextRenderingDefault(... 阅读全文
posted @ 2013-05-09 10:24 云中雀 阅读(852) 评论(1) 推荐(0)
摘要:下面介绍Winform中DataGridView的DataGridViewCheckBoxColumn使用方法:DataGridViewCheckBoxColumnCheckBox是否选中 在判断DataGridView中CheckBox选中列的时候,用DataGridViewRow.Cells[0].FormattedValue.ToString()=="True"语句时存在问题,当我们直接点击CheckBox时,结果显示未选中,但是如果我们在点击其他单元格时,结果显示选中。而用DataGridViewRow.Cells[0].EditedFormattedValue.T 阅读全文
posted @ 2013-03-06 14:07 云中雀 阅读(9439) 评论(0) 推荐(0)
摘要:global关键字,就是字面的意思,全局。其实有些时候会犯一些错误,就是类名取了一个跟系统类名雷同的情况,其实这是设计上的失误,但是会出现一个情况就是没改了,那么global关键字就起到了作用。如下代码:View Code using System;using System.Collections.Generic;using System.Linq;using System.Text; namespace globalFunc{ class Program { static void Main(string[] args) { Sy... 阅读全文
posted @ 2013-01-07 09:41 云中雀 阅读(15966) 评论(5) 推荐(5)
摘要:Winform自定义控件实例写在前面: .Net已经成为许多软件公司的选择,而.Net自定义WinForm界面控件,也成为编程的热点,越来越多的程序员会开发自己需要的自定义界面控件.小作坊网介绍了多种自定义的界面控件,基本了包括了日常所需的各种基本控件,介绍的自定义控件,都对原有的界面控件作了扩展,使之更适用了系统或更美观.下面作一个小结:.Net自定义控件之WinForm的经典OutlookBarhttp://www.myfirm.cn/News/DotNetUserInterface/20080201073632383.html主要介绍一个样子与经典Outlook的导航栏差不多的自定义控件 阅读全文
posted @ 2013-01-04 15:31 云中雀 阅读(802) 评论(1) 推荐(1)
摘要:整理了一些在WinForm开发中可以使用的开源组件.(文章及相关代码搜集自网络,仅供学习参考,版权属于原作者! ).1.仿office 2007的Ribbon风格面板(该控件模仿office 2007的Ribbon风格,显示操作面板。)2..NET中最全功能的表格控件[翻译]Mathew Hall.著XPTable - .NET ListView meets Java's JTable[简介]由于项目需要,我需要定制一个ListView,它必须能够在列中插入图像、下拉框、可上下调整的数字、进度条等等。由于已经有了一个Java下的背景,我将简单地基于那个JTable封装。[功能]全定制可 阅读全文
posted @ 2013-01-03 14:58 云中雀 阅读(1975) 评论(0) 推荐(0)