读书人

一个沿袭TextBox的控件TextChanged事件

发布时间: 2012-09-29 10:30:01 作者: rapoo

一个继承TextBox的控件TextChanged事件不无效为什么呀
是因为在继承控件中使用了OnKeyPress吗,要怎么样才能在控件正正常使用TextChanged事件
Protected Overrides Sub OnKeyPress(e As KeyPressEventArgs)


[解决办法]
你是不是没有在OnKeyPress中调用基类的同名函数:

VB.NET code
MyBase.OnKeyPress(e) 

读书人网 >VB Dotnet

热点推荐