Here are the examples of the csharp api class System.Windows.Forms.Form.WndProc(ref System.Windows.Forms.Message) taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.
200 Examples
0
1. Example
View licenseprotected override void WndProc(ref Message m) { // We are a transparent window, so mouse is never over us if (m.Msg == (int)PI.WM_NCHITTEST) { // Allow actions to occur to window beneath us m.Result = (IntPtr)PI.HTTRANSPARENT; } else base.WndProc(ref m); }
0
2. Example
View licenseprotected override void WndProc(ref Message m) { if (m.Msg == (int)Win32.Msgs.WM_NCHITTEST) { m.Result = (IntPtr)Win32.HitTest.HTTRANSPARENT; return; } base.WndProc (ref m); }
0
3. Example
View licenseprotected override void WndProc(ref Message m) { if (m.Msg == (int)Win32.Msgs.WM_NCHITTEST) { m.Result = (IntPtr)Win32.HitTest.HTTRANSPARENT; return; } base.WndProc(ref m); }
0
4. Example
View licenseprotected override void WndProc(ref Message m) { const int WM_NCHITTEST = 132; const int HTTRANSPARENT = -1; switch (m.Msg) { // Ignore all mouse interactions case WM_NCHITTEST: m.Result = (IntPtr) HTTRANSPARENT; break; } base.WndProc(ref m); }
0
5. Example
View licenseprotected override void WndProc(ref Message m) { const int WM_NCHITTEST = 132; const int HTTRANSPARENT = -1; switch (m.Msg) { // Ignore all mouse interactions case WM_NCHITTEST: m.Result = (IntPtr) HTTRANSPARENT; break; } base.WndProc(ref m); }
0
6. Example
View licenseprotected override void WndProc(ref Message m) { frame.WindowsProcedure(ref m); base.WndProc (ref m); }
0
7. Example
View licenseprotected override void WndProc(ref Message m) { //????????b?Z?[?W??t?b?N???? //[email protected]_SYSCOMMAND(0x112) if (m.Msg == 0x112){ //SC_MINIMIZE(0xF020) ????? if(m.WParam == (IntPtr)0xF020){ _kernel.View.SetVisible(false); return; //Ver5.0.0-a5 //SC_CLOSE(0xF060)?N???[?Y?E?C???h?E } if(m.WParam == (IntPtr)0xF060){ _kernel.View.SetVisible(false); return; } } base.WndProc(ref m); }
0
8. Example
View licenseprotected override void WndProc(ref Message m) { bool handled = false; if (this.TabbedThumbnail != null) { handled = TaskbarWindowManager.DispatchMessage(ref m, this.TabbedThumbnail.TaskbarWindow); } // If it's a WM_Destroy message, then also forward it to the base class (our native window) if ((m.Msg == (int)WindowMessage.Destroy) || (m.Msg == (int)WindowMessage.NCDestroy) || ((m.Msg == (int)WindowMessage.SystemCommand) && (((int)m.WParam) == TabbedThumbnailNativeMethods.ScClose))) { base.WndProc(ref m); } else if (!handled) { base.WndProc(ref m); } }
0
9. Example
View licenseprotected override void WndProc(ref Message m) { if (m.Msg == (int)Win32.Msgs.WM_NCHITTEST) { m.Result = (IntPtr)Win32.HitTest.HTTRANSPARENT; return; } base.WndProc(ref m); }
0
10. Example
View licenseprotected override void WndProc(ref Message m) { const int WM_NCHITTEST = 132; const int HTTRANSPARENT = -1; switch (m.Msg) { // Ignore all mouse interactions case WM_NCHITTEST: m.Result = (IntPtr)HTTRANSPARENT; break; } base.WndProc(ref m); }
0
11. Example
View licenseprotected override void WndProc(ref Message m) { if ((m_ContextMenu == null) || (!m_ContextMenu.HandleMenuMessage(ref m))) { base.WndProc(ref m); } }
0
12. Example
View licenseprotected override void WndProc(ref Message m) { if ((m_ContextMenu == null) || (!m_ContextMenu.HandleMenuMessage(ref m))) { base.WndProc(ref m); } }
0
13. Example
View licenseprotected override void WndProc(ref Message m) { if (_notifyHnds.Count > 0 && m.Msg == 0x4e)//WM_NOTIFY foreach (var hnd in _notifyHnds) hnd(ref m); base.WndProc(ref m); }
0
14. Example
View licenseprotected override void WndProc(ref Message m) { // ???????????????????????????? if (m.Msg == 0x0014) // ???????? return; base.WndProc(ref m); }
0
15. Example
View licenseprotected override void WndProc(ref Message m) { base.WndProc(ref m); if (m.Msg == WM_SYSCOMMAND) { if ((int)m.WParam == SYSMENU_ATTACH_MENU) { FormMain.Instance.ParseOutGoingCommand(dockedControl.Connection, "/attach"); } if ((int)m.WParam == SYSMENU_DETACH_MENU) { FormMain.Instance.ParseOutGoingCommand(dockedControl.Connection, "/detach"); } } }
0
16. Example
View licenseprotected override void WndProc(ref Message m) { int WM_NCHITTEST = 0x84; int HTTRANSPARENT = -1; if (m.Msg == (int)WM_NCHITTEST) m.Result = (IntPtr)HTTRANSPARENT; else base.WndProc(ref m); }
0
17. Example
View licenseprotected override void WndProc(ref Message m) { bool processed = false; switch((WM)m.Msg) { case WM.NCHITTEST: m.Result = (IntPtr)1; processed = true; break; case WM.MOUSEACTIVATE: m.Result = (IntPtr)4; processed = true; return; } if(!processed) { base.WndProc(ref m); } }
0
18. Example
View licenseprotected override void WndProc(ref Message m) { if(Utility.TaskBarList != null) { if(m.Msg == Utility.WM_TASKBAR_BUTTON_CREATED) { _canUseWin7Api = true; } } base.WndProc(ref m); }
0
0
20. Example
View licenseprotected override void WndProc(ref Message m) { bool callBase = this.focusHelper.WndProcForFocus(ref m); if (callBase) { base.WndProc(ref m); } }
0
21. Example
View licenseprotected override void WndProc(ref Message m) { if (m.Msg == (int)Win32.Msgs.WM_NCHITTEST) { m.Result = (IntPtr)Win32.HitTest.HTTRANSPARENT; return; } base.WndProc (ref m); }
0
22. Example
View licenseprotected override void WndProc(ref Message m) { if (m.Msg == WM_ERASEBKGND) // ignore this message return; base.WndProc(ref m); }
0
23. Example
View licenseprotected override void WndProc(ref Message m) { const int WM_NCHITTEST = 132; const int HTTRANSPARENT = -1; switch (m.Msg) { // Ignore all mouse interactions case WM_NCHITTEST: m.Result = (IntPtr)HTTRANSPARENT; break; } base.WndProc(ref m); }
0
24. Example
View licenseprotected override void WndProc(ref Message m) { if (m.Msg == win32.WM_COPYDATA) { } base.WndProc(ref m); }
0
25. Example
View licenseprotected override void WndProc(ref Message m) { if (m.Msg == NativeMethods.WM_SHOWME) { if (WindowState == FormWindowState.Minimized) { WindowState = FormWindowState.Normal; } // get our current "TopMost" value (ours will always be false though) bool top = TopMost; // make our form jump to the top of everything TopMost = true; // set it back to whatever it was TopMost = top; } base.WndProc(ref m); }
0
26. Example
View licenseprotected override void WndProc(ref Message m) { const int WM_NCHITTEST = 132; const int HTTRANSPARENT = -1; switch (m.Msg) { // Ignore all mouse interactions case WM_NCHITTEST: m.Result = (IntPtr)HTTRANSPARENT; break; } base.WndProc(ref m); }
0
27. Example
View licenseprotected override void WndProc(ref Message m) { if (m.Msg == (int)WM_NCHITTEST) m.Result = (IntPtr)HTTRANSPARENT; else if (m.Msg != WM_ERASEBKGND) base.WndProc(ref m); }
0
28. Example
View licenseprotected override void WndProc(ref Message m) { this.mouse.ProcessRawInput(m); base.WndProc(ref m); }
0
29. Example
View licenseprotected override void WndProc(ref Message message) { if (message.Msg == NativeMethods.WmNchittest) { // Tell Windows that the user is on the title bar (caption) message.Result = (IntPtr) NativeMethods.Htcaption; } else { base.WndProc(ref message); } }
0
30. Example
View licenseprotected override void WndProc(ref Message m) { if (m.Msg == (int)Win32.Msgs.WM_NCHITTEST) { m.Result = (IntPtr)Win32.HitTest.HTTRANSPARENT; return; } base.WndProc(ref m); }
0
31. Example
View licenseprivate void WmNCHitTest(ref System.Windows.Forms.Message m) { base.WndProc(ref m); if (m.Result != (IntPtr)(int)HitTestCodes.Client) m.Result = (IntPtr)HitTestCodes.Nowhere; }
0
32. Example
View licenseprotected override void WndProc(ref Message m) { const int WM_NCLBUTTONDBLCLK = 0x00A3; // Prevent double click on border const int WM_NCHITTEST = 0x0084; // Prevent resize cursors switch (m.Msg) { case WM_NCLBUTTONDBLCLK: m.Result = IntPtr.Zero; return; case WM_NCHITTEST: m.Result = IntPtr.Zero; return; } base.WndProc(ref m); }
0
33. Example
View licenseprotected override void WndProc(ref Message m) { if (m.Msg == NativeMethods.WM_MOUSEACTIVATE) { MouseActivated = true; m.Result = (IntPtr)NativeMethods.MA_NOACTIVATEANDEAT; return; } base.WndProc(ref m); }
0
34. Example
View licenseprotected override void WndProc(ref Message m) { if (m.Msg == NativeMethods.WM_ERASEBKGND) { m.Msg = NativeMethods.WM_NULL; } base.WndProc(ref m); }
0
35. Example
View licenseprotected override void WndProc(ref Message m) { switch (m.Msg) { case WM_NCHITTEST: base.WndProc(ref m); if ((int)m.Result == HTCLIENT) m.Result = (IntPtr)HTCAPTION; return; case WM_NCLBUTTONDBLCLK: break; default: base.WndProc(ref m); break; } }
0
36. Example
View licenseprotected override void WndProc(ref Message m) { switch (m.Msg) { case WM_NCHITTEST: base.WndProc(ref m); if ((int)m.Result == HTCLIENT) m.Result = (IntPtr)HTCAPTION; return; case WM_NCLBUTTONDBLCLK: break; default: base.WndProc(ref m); break; } }
0
37. Example
View licenseprotected override void WndProc(ref Message message) { const int WM_SIZING = 532; //const int WM_SIZE = 533; const int WM_MOVING = 534; const int WM_SYSCOMMAND = 0x0112; const int SC_MINIMIZE = 0xF020; switch (message.Msg) { case WM_SIZING: case WM_MOVING: updatePause = 2; break; case WM_SYSCOMMAND: if ((int)message.WParam == SC_MINIMIZE) { Util.Utils.ReleaseMemory(); } break; } base.WndProc(ref message); }
0
38. Example
View licenseprotected override void WndProc(ref Message m) { if (_sirenOfShameDevice != null) { _sirenOfShameDevice.WndProc(ref m); } base.WndProc(ref m); }
0
39. Example
View licenseprotected override void WndProc(ref Message message) { if (message.Msg == ProgramSingleInstance.WM_SHOWFIRSTINSTANCE) { if (this.WindowState == FormWindowState.Minimized) { this.WindowState = FormWindowState.Normal; } this.ShowOrActivate(); } base.WndProc(ref message); }
0
40. Example
View license[SecurityPermission(SecurityAction.LinkDemand, Flags = SecurityPermissionFlag.UnmanagedCode), SecurityPermission(SecurityAction.InheritanceDemand, Flags = SecurityPermissionFlag.UnmanagedCode)] protected override void WndProc(ref Message m) { base.WndProc(ref m); if (m.Msg == GKUI.Components.NativeMethods.WM_KEEPMODELESS) { AppHost.Instance.WidgetsEnable(); } }
0
41. Example
View licenseprotected override void WndProc(ref Message message) { const int WM_SIZING = 532; //const int WM_SIZE = 533; const int WM_MOVING = 534; const int WM_SYSCOMMAND = 0x0112; const int SC_MINIMIZE = 0xF020; switch (message.Msg) { case WM_SIZING: case WM_MOVING: updatePause = 2; break; case WM_SYSCOMMAND: if ((int)message.WParam == SC_MINIMIZE) { Util.Utils.ReleaseMemory(); } break; } base.WndProc(ref message); }
0
42. Example
View licenseprotected override void WndProc(ref Message message) { const int WM_SIZING = 532; //const int WM_SIZE = 533; const int WM_MOVING = 534; const int WM_SYSCOMMAND = 0x0112; const int SC_MINIMIZE = 0xF020; switch (message.Msg) { case WM_SIZING: case WM_MOVING: updatePause = 2; break; case WM_SYSCOMMAND: if ((int)message.WParam == SC_MINIMIZE) { Util.Utils.ReleaseMemory(); } break; } base.WndProc(ref message); }
0
43. Example
View licenseprotected override void WndProc(ref Message m) { if (m.Msg == 0x0084 /*WM_NCHITTEST*/) { m.Result = (IntPtr)2; // HTCLIENT Program.settings.OSD.Left = Left; Program.settings.OSD.Top = Top; return; } base.WndProc(ref m); }
0
44. Example
View licenseprotected override void WndProc(ref Message m) { const int WM_SYSCOMMAND = 0x0112; const int SC_CLOSE = 0xF060; if (m.Msg == WM_SYSCOMMAND && (int)m.WParam == SC_CLOSE) { return; } base.WndProc(ref m); }
0
45. Example
View licenseprotected override void WndProc( ref Message m ) { if( m.Msg == DWMMessages.WM_DWMCOMPOSITIONCHANGED || m.Msg == DWMMessages.WM_DWMNCRENDERINGCHANGED ) { if( AeroGlassCompositionChanged != null ) { AeroGlassCompositionChanged.Invoke( this, new AeroGlassCompositionChangedEvenArgs( AeroGlassCompositionEnabled ) ); } } base.WndProc( ref m ); }
0
46. Example
View licenseprotected override void WndProc(ref Message m) { bool handled = false; if(this.TabbedThumbnail != null) handled = TaskbarWindowManager.Instance.DispatchMessage(ref m, this.TabbedThumbnail.TaskbarWindow); // If it's a WM_Destroy message, then also forward it to the base class (our native window) if ((m.Msg == (int)TabbedThumbnailNativeMethods.WM_DESTROY) || (m.Msg == (int)TabbedThumbnailNativeMethods.WM_NCDESTROY) || ((m.Msg == (int)TabbedThumbnailNativeMethods.WM_SYSCOMMAND) && (((int)m.WParam) == TabbedThumbnailNativeMethods.SC_CLOSE))) { base.WndProc(ref m); } else if (!handled) base.WndProc(ref m); }
0
47. Example
View licenseprotected override void WndProc(ref Message m) { base.WndProc(ref m); // Pass window messages on to the hotkey handler. hotkeys?.HandleWndProc(ref m); }
0
48. Example
View licenseprotected override void WndProc(ref Message m) { if (m.Msg == (int) Msgs.WM_NCHITTEST) { m.Result = (IntPtr) HitTest.HTTRANSPARENT; return; } base.WndProc(ref m); }
0
49. Example
View licenseprotected override void WndProc(ref Message m) { base.WndProc(ref m); if (WndProcMessage != null) { WndProcMessage(ref m); } }
0
50. Example
View licenseprotected override void WndProc(ref Message m) { switch (m.Msg) { case 0x112: // WM_SYSCOMMAND switch ((int)m.WParam & 0xFFF0) { case 0xF100: // SC_KEYMENU m.Result = IntPtr.Zero; break; case 0xF140: // SC_SCREENSAVER case 0xF170: // SC_MONITORPOWER break; default: base.WndProc(ref m); break; } break; default: base.WndProc(ref m); break; } }