随笔分类 -  winform

摘要:1.自定义控件, 和接口 interface IModify { bool IsModified { get; } } class TextBoxEx : TextBox, IModify { private bool isModified = false; public bool IsModified { get { return isModified; } } protected override void OnTextChanged(EventArgs ... 阅读全文
posted @ 2011-12-23 18:53 一浩瀚星空一 阅读(2867) 评论(1) 推荐(1) 编辑
摘要:private void treeView1_AfterCheck(object sender, TreeViewEventArgs e){ if (e.Action != TreeViewAction.ByMouse) return; SetParentNode(e.Node); SetChildNode(e.Node);}private void SetParentNode(TreeNode node){ if (node.Level > 0) { node.Parent.Checked = true; SetParentNode(node.Parent); }}private vo 阅读全文
posted @ 2011-08-02 17:06 一浩瀚星空一 阅读(2885) 评论(0) 推荐(1) 编辑
摘要:using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Text;using System.Windows.Forms;namespace WindowsFormsApplication3{ public partial class Form3 : Form { public Form3() { InitializeComponent(); } public struct ComboBoxItem&l 阅读全文
posted @ 2011-07-22 09:29 一浩瀚星空一 阅读(6347) 评论(0) 推荐(2) 编辑
摘要:using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Text;using System.Windows.Forms;namespace WindowsFormsApplication3{ public partial class Form2 : Form { public Form2() { InitializeComponent(); this.comboBox1.DropDownStyle = 阅读全文
posted @ 2011-07-21 14:15 一浩瀚星空一 阅读(1923) 评论(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 WindowsFormsApplication3{ public partial class Form1 : Form { public Form1() { InitializeComponent(); } class User { public int id { 阅读全文
posted @ 2011-07-21 11:37 一浩瀚星空一 阅读(8072) 评论(0) 推荐(0) 编辑
摘要:通过重写 ProcessCmdKey 方法 <!--<br /><br />Code highlighting produced by Actipro CodeHighlighter (freeware)<br />http://www.CodeHighlighter.com/<br /><br / 阅读全文
posted @ 2009-10-08 11:45 一浩瀚星空一 阅读(143) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示