博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

2011年7月17日

摘要: http://www.cnblogs.com/peterzb/tag/WinForm/ 阅读全文

posted @ 2011-07-17 22:46 itcfj 阅读(154) 评论(0) 推荐(0) 编辑

摘要: 在CheckBox改变值得时候,执行需要的业务。summary 我的做法是,将焦点转移出去,触发CellValueChanged事件 summary public partial class Form1 Form { public Form1() { InitializeComponent(); } private void button1_Click(object sender, EventArgs e) { CreateData(); } summary 绑定数据 summary private void CreateData() { DataTable dtSource = new Da 阅读全文

posted @ 2011-07-17 22:05 itcfj 阅读(1186) 评论(0) 推荐(0) 编辑

摘要: 关于DataGridView绑定数据源后未设置的列不显示dataGridView.AutoGenerateColumns = false; 阅读全文

posted @ 2011-07-17 22:03 itcfj 阅读(233) 评论(0) 推荐(0) 编辑

摘要: 源码:WebCast20070608am_Demo.zip 阅读全文

posted @ 2011-07-17 18:46 itcfj 阅读(138) 评论(0) 推荐(0) 编辑

摘要: 效果图:代码:using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Text;using System.Windows.Forms;namespace NotifyIconDemo{ public partial class Tray : Form { public Tray() { InitializeComponent(); } private void cToolStripMenuItem_C 阅读全文

posted @ 2011-07-17 18:40 itcfj 阅读(249) 评论(0) 推荐(0) 编辑

摘要: 源码:WebCast20070608am_Demo.zip 效果:Form2 制作不规则窗体:Form2:using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Text;using System.Windows.Forms;namespace MSNMessageForm{ public partial class Form2 : Form { private int heightMax, widt 阅读全文

posted @ 2011-07-17 18:27 itcfj 阅读(161) 评论(0) 推荐(0) 编辑

摘要: 以前对WinForm窗体显示和窗体间传值了解不是很清楚最近做了一些WinForm开发,把用到的相关知识整理如下A.WinForm中窗体显示显示窗体可以有以下2种方法:Form.ShowDialog方法 (窗体显示为模式窗体)Form.Show方法 (窗体显示为无模式窗体)2者具体区别如下:1.在调用Form.Show方法后,Show方法后面的代码会立即执行2.在调用Form.ShowDialog方法后,直到关闭对话框后,才执行此方法后面的代码3.当窗体显示为模式窗体时,单击“关闭”按钮会隐藏窗体,并将DialogResult属性设置为DialogResult.Cancel 与无模式窗体不同,当 阅读全文

posted @ 2011-07-17 18:15 itcfj 阅读(168) 评论(0) 推荐(0) 编辑

摘要: using System;using System.Collections.Generic;using System.ComponentModel;using System.Drawing;using System.Threading;using System.Windows.Forms;using System.Xml;namespace UseBackgroundWorker{ public partial class Form1 : Form { private XmlDocument document = null; public Form1() { InitializeCompone 阅读全文

posted @ 2011-07-17 18:12 itcfj 阅读(200) 评论(0) 推荐(0) 编辑

摘要: 源码:WebCast20070601_Demo.zipusing System;using System.Drawing;using System.Collections;using System.ComponentModel;using System.Windows.Forms;using System.Data;using System.IO;//添加引用,以使用文件和目录类namespace ListView_TreeView{ /// <summary> /// 使用Treeview和ListView示例,产生和Windows资源管理器效果 /// </summary 阅读全文

posted @ 2011-07-17 18:10 itcfj 阅读(729) 评论(0) 推荐(0) 编辑

摘要: 源码:WebCast20070601_Demo.zip //---------------------------------------------------------------------// This file is part of the Microsoft .NET Framework SDK Code Samples.// // Copyright (C) Microsoft Corporation. All rights reserved.// //This source code is intended only as a supplement to Microsoft/ 阅读全文

posted @ 2011-07-17 18:05 itcfj 阅读(645) 评论(0) 推荐(0) 编辑

摘要: 每个scroll控件的using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Text;using System.Windows.Forms;namespace ScrollDemo{ public partial class Form1 : Form { Color backColor = Color.Black; public Form1() { InitializeComponent(); } 阅读全文

posted @ 2011-07-17 18:03 itcfj 阅读(218) 评论(0) 推荐(0) 编辑

摘要: 把多个radioButton 放在同一个容器中using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Text;using System.Windows.Forms;namespace RadioButtonDemo{ public partial class Form1 : Form { private Color curColor; public Form1() { InitializeCompo 阅读全文

posted @ 2011-07-17 17:57 itcfj 阅读(213) 评论(0) 推荐(0) 编辑

摘要: 方法一:把Form1 的属性设为位图:BackPic.bmp,using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Text;using System.Windows.Forms;namespace IrregularForm{ public partial class Form1 : Form { private Point mouseOffset; private bool isMouseDow 阅读全文

posted @ 2011-07-17 17:38 itcfj 阅读(218) 评论(0) 推荐(0) 编辑