主要方法是派生一个新的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;   
    }   
}

相关文章:

  • 2021-12-19
  • 2021-09-08
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-09-18
  • 2021-08-19
  • 2022-12-23
  • 2022-12-23
  • 2022-02-08
相关资源
相似解决方案