ComboBoxTree实现
ComboBoxTree 2009-03-24 11:32 128人阅读 评论(0) 收藏 举报 /*-----2009-03-28 * ----主要实现ComboBox框的下拉功能TreeView 功能 * 当TreeView的CheckBoxes属性为false时,当前选择的节点的Name 存储在ComboBox的Tag属性里 */ using System.Data; using System.Text; using System.Windows.Forms; using System.ComponentModel; public class ComboBoxTree : ComboBox { /// <summary> /// 定义鼠标左键点击消息 /// </summary> private const int WM_LBUTTONDOWN = 0x201; /// <summary> //...
c# 中LISTVIEW垂直滚动条
c# 中LISTVIEW垂直滚动条怎么实现啊? 有时有有时无,怎么回事? //写一个新类 public class ListViewEx : ListView { [System.Runtime.InteropServices.DllImport("user32.dll")] public static extern int ShowScrollBar(IntPtr hWnd, int iBar, int bShow); const int SB_HORZ = 0; const int SB_VERT = 1; protected override void WndProc(ref Message m) { if (this.Vi...