示例#1
0
        private Rectangle GetDropDownButtonRect()
        {
            ComboBox     comboBox = new ComboBox();
            ComboBoxInfo info     = default(ComboBoxInfo);

            info.cbSize = Marshal.SizeOf((object)info);
            Win32.GetComboBoxInfo(comboBox.Handle, ref info);
            comboBox.Dispose();
            int width = info.rcButton.Rect.Width;

            return(new Rectangle(base.Width - width - _Margin * 2, _Margin, base.Height - _Margin, base.Height - _Margin * 2));
        }
示例#2
0
        private Rectangle GetDropDownButtonRect()
        {
            ComboBoxInfo comboBoxInfo = GetComboBoxInfo();

            return(comboBoxInfo.rcButton.Rect);
        }
示例#3
0
        private bool GetComboBoxButtonPressed()
        {
            ComboBoxInfo comboBoxInfo = GetComboBoxInfo();

            return(comboBoxInfo.stateButton == ComboBoxButtonState.STATE_SYSTEM_PRESSED);
        }
示例#4
0
文件: Win32.cs 项目: wwkkww1983/WMS
 public static extern bool GetComboBoxInfo(IntPtr hwndCombo, ref ComboBoxInfo info);