//TextBox
this.m_TextBox = new TextBox();
this.m_TextBox.KeyDown += new KeyEventHandler(m_TextBox_KeyDown);
this.m_TextBox.Parent = this;
//Button
this.m_DropdownButton = new Button();
//Assembly asm = Assembly.GetExecutingAssembly();
//System.IO.Stream stream = asm.GetManifestResourceStream(asm.GetName().Name + ".BM_dropdown.bmp");
Bitmap bm = new Bitmap(this.GetType(), "1.bmp");
this.m_DropdownButton.Image = bm;
this.m_DropdownButton.Width = 16;
this.m_DropdownButton.Height = this.m_TextBox.Height - 2;
this.m_DropdownButton.Location = new Point(this.m_TextBox.Right - 18, 1);
this.m_DropdownButton.Click += new EventHandler(m_DropdownButton_Click);
//this.m_DropdownButton.FlatStyle = FlatStyle.Flat;
this.m_DropdownButton.Parent = this;
this.m_DropdownButton.BringToFront();
//image
this.m_Pic = new PictureBox();
this.m_Pic.Image = Image.FromFile("E:\\NewLayerTool\\TreeComboBox\\1.bmp", false);
this.m_Pic.Width = 16;
this.m_Pic.Height = this.m_TextBox.Height - 2;
this.m_Pic.Location = new Point(this.m_TextBox.Right - 18, 1);
this.m_Pic.Click += new EventHandler(m_Pic_Click);
this.m_Pic.BackColor = Color.White;
this.m_Pic.Parent = this;
this.m_Pic.BringToFront();
//TreeView
this.m_TreeView = new TreeView();
this.m_TreeView.Visible = false;
this.m_TreeView.DoubleClick += new EventHandler(m_TreeView_DoubleClick);
this.m_TreeView.KeyDown += new KeyEventHandler(m_TreeView_KeyDown);
this.m_TreeView.LostFocus += new EventHandler(m_TreeView_LostFocus);
this.m_TreeView.BeforeExpand += new TreeViewCancelEventHandler(m_TreeView_BeforeExpand);
this.m_TreeView.BeforeCollapse += new TreeViewCancelEventHandler(TreeComboBox_BeforeCollapse);
this.m_TreeView.AfterExpand += new TreeViewEventHandler(m_TreeView_AfterExpand);
this.m_TreeView.AfterCollapse += new TreeViewEventHandler(TreeComboBox_AfterCollapse);
this.m_TreeView.Location = new Point(0, 0);
this.m_TreeView.Parent = null;
this.LostFocus += new EventHandler(TreeComboBox_LostFocus);
比较倒三角是按钮或者图片,哪种更接近combobox