其实这类的文章在国外的技术网站上也有很多,但是都没有实现combobox的自动下拉.
在这里实现了自动下拉.
在这里我把combobox做成了一个控件(XComBo)来实现功能.它从ComboBox,可以将新建的
工程的继承改为 Inherits System.Windows.Forms.ComboBox
我认为很关键的两点是API函数SendMessage的调用和KeyPress代码段e.Handled = True的应用。
If the event is not handled, it will be sent to the operating system for default processing. Set Handled to true to cancel the KeyPress event.
Control's code:(100%原创)
相关文章: