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
0
1. Example
View licenseprotected override void WndProc(ref Message m) { base.WndProc(ref m); if ((int)(long)m.WParam == 0x3e80001) { dropDownWindow = new LBNativeWindow(m.LParam, this); } }
0
2. Example
View licenseprotected 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; } }
0
3. Example
View licenseprotected 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); }
0
4. Example
View licenseprotected 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; } }
0
5. Example
View licenseprotected 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); }
0
6. Example
View licenseprotected override void WndProc(ref Message m) { base.WndProc(ref m); if (((m.Msg == WM_PAINT) || (m.Msg == OCM_COMMAND)) && (drawPrompt)) { DrawTextPrompt(); } }
0
7. Example
View licenseprotected override void WndProc(ref Message m) { base.WndProc(ref m); if (((m.Msg == WM_PAINT) || (m.Msg == OCM_COMMAND)) && (drawPrompt)) { DrawTextPrompt(); } }
0
8. 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); }
0
9. 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); }
0
10. 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); }
0
11. 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); }
0
12. Example
View licenseprotected override void WndProc(ref Message m) { if (IsDropDownMessage(m)) { DisplayCategoryForm(); } else { base.WndProc(ref m); } }
0
13. 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. var timeSpan = DateTime.Now.Subtract(dropDown.LastClosedTimeStamp); if (timeSpan.TotalMilliseconds > 500) { ShowDropDown(); } return; } } base.WndProc(ref m); }
0
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); }
0
15. Example
View licenseprotected 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); }
0
16. 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); }
0
17. 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); }
0
18. Example
View licenseprotected 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); }
0
19. Example
View licenseprotected 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); }
0
20. Example
View licenseprotected 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); }
0
21. Example
View licenseprotected 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); }
0
22. Example
View licenseprotected override void WndProc(ref Message m) { if (IsDropDownMessage(m)) { if (_categoryDisplayForm == null) DisplayCategoryForm(); else Focus(); } else { base.WndProc(ref m); } }
0
23. Example
View licenseprotected override void WndProc(ref Message m) { switch (m.Msg) /n ..... /n //View Source file for more details /n }