public static int GetComboDropDownWidth(ComboBox cb) { ComboInfoHelper.ComboBoxInfo cbi = new ComboInfoHelper.ComboBoxInfo(); cbi.cbSize = Marshal.SizeOf(cbi); GetComboBoxInfo(cb.Handle, ref cbi); int width = cbi.rcButton.Right - cbi.rcButton.Left; return(width); }
public static int GetComboDropDownWidth(ComboBox cb) { ComboInfoHelper.ComboBoxInfo cbi = new ComboInfoHelper.ComboBoxInfo(); cbi.cbSize = Marshal.SizeOf(cbi); GetComboBoxInfo(cb.Handle, ref cbi); int width = cbi.rcButton.Right - cbi.rcButton.Left; return width; }