System.Windows.Forms.ComboBox.WndProc(ref System.Windows.Forms.Message)

Here are the examples of the csharp api class System.Windows.Forms.ComboBox.WndProc(ref System.Windows.Forms.Message) taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.

23 Examples 7

1. Example

View license
protected override void WndProc(ref Message m)
		{
			base.WndProc(ref m);
			if ((int)(long)m.WParam == 0x3e80001)
			{
				dropDownWindow = new LBNativeWindow(m.LParam, this);
			}
		}

2. Example

Project: XOutput
Source File: MultiLevelComboBox.cs
View license
protected override void WndProc(ref Message m)
        {
            switch (m.Msg)
            {
                case 0x87: //WM_GETDLGCODE
                    break;//Block key down messages
                case 0x201: //WM_LBUTTONDOWN
                    DroppedDown = !DroppedDown;
                    break;
                case 0x203: //WM_LBUTTONDBLCLK
                    DroppedDown = !DroppedDown;
                    break;
                default:
                    base.WndProc(ref m);
                    break;
            }
        }

3. Example

Project: sharpshell
Source File: LookInComboBox.cs
View license
protected override void WndProc(ref Message m)
        {
            if (m.Msg == NativeMethods.WM_CTLCOLORLISTBOX)
            {
                Rectangle comboRect = RectangleToScreen(ClientRectangle);
                int ddX = comboRect.Left;
                int ddY = comboRect.Bottom;

                if (ddX < 0)
                    ddX = 0;
                else if (ddX + DropDownWidth > Screen.PrimaryScreen.WorkingArea.Width)
                    ddX = Screen.PrimaryScreen.WorkingArea.Width - DropDownWidth;

                NativeMethods.User32.SetWindowPos(
                    new HandleRef(null, m.LParam),
                    NativeMethods.NullHandleRef,
                    ddX, ddY, 0, 0,
                    NativeMethods.SWP_NOSIZE);
            }

            base.WndProc(ref m);
        }

4. Example

View license
protected override void WndProc(ref Message m)
        {
            // Filter window messages
            switch (m.Msg)
            {
                // Draw a custom color border around the drop down list cintaining popup
                case WM_CTLCOLORLISTBOX:
                    base.WndProc(ref m);
                    DrawNativeBorder(m.LParam);
                    break;

                default: base.WndProc(ref m); break;
            }
        }

5. Example

Project: gitter
Source File: CustomPopupComboBox.cs
View license
protected override void WndProc(ref Message m)
		{
			switch(m.Msg)
			{
				case ((int)WM.COMMAND + (int)WM.REFLECT):
					{
						switch(NativeUtility.HIWORD(m.WParam))
						{
							case Constants.CBN_DROPDOWN:
								ShowDropDownCore();
								return;
						}
					}
					break;
			}
			base.WndProc(ref m);
		}

6. Example

Project: Mist
Source File: MetroComboBox.cs
View license
protected override void WndProc(ref Message m)
        {
            base.WndProc(ref m);

            if (((m.Msg == WM_PAINT) || (m.Msg == OCM_COMMAND)) && (drawPrompt))
            {
                DrawTextPrompt();
            }
        }

7. Example

Project: winauth
Source File: MetroComboBox.cs
View license
protected override void WndProc(ref Message m)
        {
            base.WndProc(ref m);

            if (((m.Msg == WM_PAINT) || (m.Msg == OCM_COMMAND)) && (drawPrompt))
            {
                DrawTextPrompt();
            }
        }

8. Example

Project: RNGReporter
Source File: PopupComboBox.cs
View license
[SecurityPermission(SecurityAction.LinkDemand, Flags = SecurityPermissionFlag.UnmanagedCode)]
        protected override void WndProc(ref Message m)
        {
            if (m.Msg == (NativeMethods.WM_REFLECT + NativeMethods.WM_COMMAND))
            {
                if (NativeMethods.HIWORD(m.WParam) == NativeMethods.CBN_DROPDOWN)
                {
                    // Blocks a redisplay when the user closes the control by clicking 
                    // on the combobox.
                    TimeSpan TimeSpan = DateTime.Now.Subtract(dropDown.LastClosedTimeStamp);
                    if (TimeSpan.TotalMilliseconds > 500)
                        ShowDropDown();
                    return;
                }
            }
            base.WndProc(ref m);
        }

9. Example

Project: JexusManager
Source File: PopupComboBox.cs
View license
[SecurityPermission(SecurityAction.LinkDemand, Flags = SecurityPermissionFlag.UnmanagedCode)]
        protected override void WndProc(ref Message m)
        {
            if (m.Msg == (NativeMethods.WM_REFLECT + NativeMethods.WM_COMMAND))
            {
                if (NativeMethods.HIWORD(m.WParam) == NativeMethods.CBN_DROPDOWN)
                {
                    // Blocks a redisplay when the user closes the control by clicking 
                    // on the combobox.
                    TimeSpan TimeSpan = DateTime.Now.Subtract(dropDown.LastClosedTimeStamp);
                    if (TimeSpan.TotalMilliseconds > 500)
                        ShowDropDown();
                    return;
                }
            }
            base.WndProc(ref m);
        }

10. Example

Project: NPS_Browser
Source File: PopupComboBox.cs
View license
[SecurityPermission(SecurityAction.LinkDemand, Flags = SecurityPermissionFlag.UnmanagedCode)]
        protected override void WndProc(ref Message m)
        {
            if (m.Msg == (NativeMethods.WM_REFLECT + NativeMethods.WM_COMMAND))
            {
                if (NativeMethods.HIWORD(m.WParam) == NativeMethods.CBN_DROPDOWN)
                {
                    // Blocks a redisplay when the user closes the control by clicking 
                    // on the combobox.

                    TimeSpan TimeSpan = DateTime.Now.Subtract(dropDown.LastClosedTimeStamp);
                    if (TimeSpan.TotalMilliseconds > 500)
                        ShowDropDown();
                    return;
                }
            }
            base.WndProc(ref m);
        }

11. Example

Project: WEPExplorer
Source File: PopupComboBox.cs
View license
[SecurityPermission(SecurityAction.LinkDemand, Flags = SecurityPermissionFlag.UnmanagedCode)]
        protected override void WndProc(ref Message m)
        {
            if (m.Msg == (NativeMethods.WM_REFLECT + NativeMethods.WM_COMMAND))
            {
                if (NativeMethods.HIWORD(m.WParam) == NativeMethods.CBN_DROPDOWN)
                {
                    // Blocks a redisplay when the user closes the control by clicking 
                    // on the combobox.
                    TimeSpan TimeSpan = DateTime.Now.Subtract(dropDown.LastClosedTimeStamp);
                    if (TimeSpan.TotalMilliseconds > 500)
                        ShowDropDown();
                    return;
                }
            }
            base.WndProc(ref m);
        }

12. Example

View license
protected override void WndProc(ref Message m)
        {
            if (IsDropDownMessage(m))
            {
                DisplayCategoryForm();
            }
            else
            {
                base.WndProc(ref m);
            }
        }

13. Example

Project: ServiceBusExplorer
Source File: PopupComboBox.cs
View license
[SecurityPermission(SecurityAction.LinkDemand, Flags = SecurityPermissionFlag.UnmanagedCode)]
        protected override void WndProc(ref Message m)
        {
            if (m.Msg == (NativeMethods.WM_REFLECT + NativeMethods.WM_COMMAND))
            {
                if (NativeMethods.HIWORD(m.WParam) == NativeMethods.CBN_DROPDOWN)
                {
                    // Blocks a redisplay when the user closes the control by clicking 
                    // on the combobox.
                    var timeSpan = DateTime.Now.Subtract(dropDown.LastClosedTimeStamp);
                    if (timeSpan.TotalMilliseconds > 500)
                    {
                        ShowDropDown();
                    }
                    return;
                }
            }
            base.WndProc(ref m);
        }

14. Example

View license
[SecurityPermission(SecurityAction.LinkDemand, Flags = SecurityPermissionFlag.UnmanagedCode)]
        protected override void WndProc(ref Message m)
        {
            if (m.Msg == (NativeMethods.WM_REFLECT + NativeMethods.WM_COMMAND))
            {
                if (NativeMethods.HIWORD(m.WParam) == NativeMethods.CBN_DROPDOWN)
                {
                    // Blocks a redisplay when the user closes the control by clicking 
                    // on the combobox.
                    TimeSpan TimeSpan = DateTime.Now.Subtract(dropDown.LastClosedTimeStamp);
                    if (TimeSpan.TotalMilliseconds > 500)
                        ShowDropDown();
                    return;
                }
            }
            base.WndProc(ref m);
        }

15. Example

Project: StackBuilder
Source File: ComboBoxColorPicker.cs
View license
protected override void WndProc(ref Message m) 
        {
            if (m.Msg == ( WM_REFLECT + WM_COMMAND)) 
            {
                if (HIWORD((int)m.WParam) == CBN_DROPDOWN) 
                {  
                    ShowDropDown();
                    return;
                }
            }
            base.WndProc(ref m);
        }

16. Example

Project: SMEncounterRNGTool
Source File: PopupComboBox.cs
View license
[SecurityPermission(SecurityAction.LinkDemand, Flags = SecurityPermissionFlag.UnmanagedCode)]
        protected override void WndProc(ref Message m)
        {
            if (m.Msg == (NativeMethods.WM_REFLECT + NativeMethods.WM_COMMAND))
            {
                if (NativeMethods.HIWORD(m.WParam) == NativeMethods.CBN_DROPDOWN)
                {
                    // Blocks a redisplay when the user closes the control by clicking 
                    // on the combobox.
                    TimeSpan TimeSpan = DateTime.Now.Subtract(dropDown.LastClosedTimeStamp);
                    if (TimeSpan.TotalMilliseconds > 500)
                        ShowDropDown();
                    return;
                }
            }
            base.WndProc(ref m);
        }

17. Example

Project: 3DSRNGTool
Source File: PopupComboBox.cs
View license
[SecurityPermission(SecurityAction.LinkDemand, Flags = SecurityPermissionFlag.UnmanagedCode)]
        protected override void WndProc(ref Message m)
        {
            if (m.Msg == (NativeMethods.WM_REFLECT + NativeMethods.WM_COMMAND))
            {
                if (NativeMethods.HIWORD(m.WParam) == NativeMethods.CBN_DROPDOWN)
                {
                    // Blocks a redisplay when the user closes the control by clicking 
                    // on the combobox.
                    TimeSpan TimeSpan = DateTime.Now.Subtract(dropDown.LastClosedTimeStamp);
                    if (TimeSpan.TotalMilliseconds > 500)
                        ShowDropDown();
                    return;
                }
            }
            base.WndProc(ref m);
        }

18. Example

Project: TaskScheduler
Source File: CustomComboBox.cs
View license
protected override void WndProc(ref Message m)
		{
			if (m.Msg == WM_LBUTTONDOWN)
			{
				AutoDropDown();
				return;
			}

			if (m.Msg == (WM_REFLECT + WM_COMMAND))
			{
				switch (HIWORD((int)m.WParam))
				{
					case CBN_DROPDOWN:
						AutoDropDown();
						return;

					case CBN_CLOSEUP:
						if ((DateTime.Now - m_sShowTime).TotalSeconds > 1)
							HideDropDown();
						return;
				}
			}

			base.WndProc(ref m);
		}

19. Example

Project: tesvsnip
Source File: CustomComboBox.cs
View license
protected override void WndProc(ref Message m)
        {
            if (m.Msg == WM_LBUTTONDOWN)
            {
                AutoDropDown();
                return;
            }

            if (m.Msg == (WM_REFLECT + WM_COMMAND))
            {
                switch (HIWORD((int) m.WParam))
                {
                    case CBN_DROPDOWN:
                        AutoDropDown();
                        return;

                    case CBN_CLOSEUP:
                        if ((DateTime.Now - m_sShowTime).Seconds > 1)
                            HideDropDown();
                        return;
                }
            }

            base.WndProc(ref m);
        }

20. Example

Project: falloutsnip
Source File: CustomComboBox.cs
View license
protected override void WndProc(ref Message m)
        {
            if (m.Msg == WM_LBUTTONDOWN)
            {
                AutoDropDown();
                return;
            }

            if (m.Msg == (WM_REFLECT + WM_COMMAND))
            {
                switch (HIWORD((int) m.WParam))
                {
                    case CBN_DROPDOWN:
                        AutoDropDown();
                        return;

                    case CBN_CLOSEUP:
                        if ((DateTime.Now - m_sShowTime).Seconds > 1)
                            HideDropDown();
                        return;
                }
            }

            base.WndProc(ref m);
        }

21. Example

Project: just-gestures
Source File: CheckComboBox.cs
View license
protected override void WndProc(ref Message m)
        {
            if (m.Msg == WM_LBUTTONDOWN || m.Msg == WM_LBUTTONDBLCLK)
            {
                AutoDropDown();                
                return;
            }

            if (m.Msg == (WM_REFLECT + WM_COMMAND))
            {
                switch (HIWORD((int)m.WParam))
                {
                    case CBN_DROPDOWN:
                        AutoDropDown();
                        return;

                    case CBN_CLOSEUP:
                        HideDropDown();                        
                        return;
                }
            }
            base.WndProc(ref m);
        }

22. Example

View license
protected override void WndProc(ref Message m)
        {
            if (IsDropDownMessage(m))
            {
                if (_categoryDisplayForm == null)
                    DisplayCategoryForm();
                else
                    Focus();
            }
            else
            {
                base.WndProc(ref m);
            }
        }

23. Example

Project: Krypton
Source File: KryptonComboBox.cs
View license
protected override void WndProc(ref Message m)
            {
                switch (m.Msg)
        /n ..... /n //View Source file for more details /n }