主要方法是派生一个新的ComboBox类,使它不响应滚轮事件m.Msg == 0x020A

namespace DataTools
{
/// <summary>
/// Log 的摘要说明。
/// </summary>
///
public class comboNoWheel: System.Windows.Forms.ComboBox,IMessageFilter   
{   
    public comboNoWheel()   
    {   
     Application.AddMessageFilter(this);   
    }   
    
    public bool PreFilterMessage(ref Message m)   
    {   
     if(m.Msg == 0x020A)   
      return true;   
     return false;   
    }   
}

相关文章:

猜你喜欢
相关资源
相似解决方案