I have a custom combo box control in windows forms. I want to achieve a functionality wherein based on some condition the dropdown area should not be displayed i.e. I need to pr
Just add your condition to that if statement:
if
public class CustomComboBox : ComboBox { protected override void WndProc( ref Message m ) { if(yourCondition && (m.Msg == 0x201 || // WM_LBUTTONDOWN m.Msg == 0x203)) // WM_LBUTTONDBLCLK return; base.WndProc( ref m ); } }