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

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 7

1. Example

Project: Krypton
Source File: DropSolidWindow.cs
View license
protected 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);
        }

2. Example

Project: MapleShark
Source File: DragForm.cs
View license
protected 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);
		}

3. Example

Project: dockpanelsuite
Source File: DragForm.cs
View license
protected 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);
        }

4. Example

Project: tesvsnip
Source File: GlassPanelForm.cs
View license
protected 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);
        }

5. Example

Project: falloutsnip
Source File: GlassPanelForm.cs
View license
protected 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);
        }

6. Example

Project: fomm
Source File: dxmutdata.cs
View license
protected override void WndProc(ref Message m)
        {
            frame.WindowsProcedure(ref m);
            base.WndProc (ref m);
        }

7. Example

Project: bjd5
Source File: MainForm.cs
View license
protected 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);
        }

8. Example

View license
protected 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); }
        }

9. Example

Project: ArnoldSimulator
Source File: DragForm.cs
View license
protected 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);
        }

10. Example

Project: MapViewer
Source File: GlassPanelForm.cs
View license
protected 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);
        }

11. Example

Project: gong-shell
Source File: ExplorerForm.cs
View license
protected override void WndProc(ref Message m)
        {
            if ((m_ContextMenu == null) || (!m_ContextMenu.HandleMenuMessage(ref m)))
            {
                base.WndProc(ref m);
            }
        }

12. Example

Project: gong-shell
Source File: ExplorerForm.cs
View license
protected override void WndProc(ref Message m)
        {
            if ((m_ContextMenu == null) || (!m_ContextMenu.HandleMenuMessage(ref m)))
            {
                base.WndProc(ref m);
            }
        }

13. Example

Project: NppDB
Source File: FrmDatabaseExplore.cs
View license
protected 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);
        }

14. Example

Project: WebQQWeChat
Source File: fmQQList.cs
View license
protected override void WndProc(ref Message m)
        {   // ????????????????????????????
            if (m.Msg == 0x0014) // ????????
                return;
            base.WndProc(ref m);
        }

15. Example

Project: IceChat
Source File: FormWindow.cs
View license
protected 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");
                }
            }
        }

16. Example

Project: mutefm
Source File: TopForm.cs
View license
protected 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);
        }

17. Example

Project: gitter
Source File: NotificationForm.cs
View license
protected 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);
			}
		}

18. Example

Project: gitter
Source File: FormEx.cs
View license
protected override void WndProc(ref Message m)
		{
			if(Utility.TaskBarList != null)
			{
				if(m.Msg == Utility.WM_TASKBAR_BUTTON_CREATED)
				{
					_canUseWin7Api = true;
				}
			}
			base.WndProc(ref m);
		}

19. Example

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

20. Example

Project: superputty
Source File: frmSuperPutty.cs
View license
protected override void WndProc(ref Message m)
        {
            bool callBase = this.focusHelper.WndProcForFocus(ref m);
            if (callBase)
            {
                base.WndProc(ref m);
            }
        }

21. Example

Project: lua-tilde
Source File: DragForm.cs
View license
protected 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);
		}

22. Example

Project: ElectronicObserver
Source File: FormBrowser.cs
View license
protected override void WndProc(ref Message m)
		{

			if (m.Msg == WM_ERASEBKGND)
				// ignore this message
				return;

			base.WndProc(ref m);
		}

23. Example

Project: logwizard
Source File: GlassPanelForm.cs
View license
protected 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);
        }

24. Example

Project: logwizard
Source File: Dummy.cs
View license
protected override void WndProc(ref Message m) {
            if (m.Msg == win32.WM_COPYDATA) {
            }

            base.WndProc(ref m);
        }

25. Example

Project: fdotoolbox
Source File: Workbench.cs
View license
protected 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);
        }

26. Example

View license
protected 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);
        }

27. Example

Project: just-gestures
Source File: Form_transparent.cs
View license
protected 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);
        }

28. Example

Project: MouseTester
Source File: Form1.cs
View license
protected override void WndProc(ref Message m)
        {
            this.mouse.ProcessRawInput(m);
            base.WndProc(ref m);
        }

29. Example

Project: WPF-Samples
Source File: Splash.cs
View license
protected 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);
            }
        }

30. Example

Project: Nexus-Mod-Manager
Source File: DragForm.cs
View license
protected 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);
        }

31. Example

Project: Nexus-Mod-Manager
Source File: BalloonVM.cs
View license
private void WmNCHitTest(ref System.Windows.Forms.Message m)
		{
			base.WndProc(ref m);
			
			if (m.Result != (IntPtr)(int)HitTestCodes.Client)
				m.Result = (IntPtr)HitTestCodes.Nowhere;
		}

32. Example

Project: D2ModdinClient
Source File: notificationForm.cs
View license
protected 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);
        }

33. Example

Project: SystemEx
Source File: AutoCompleteForm.cs
View license
protected 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);
        }

34. Example

Project: SystemEx
Source File: PopupForm.cs
View license
protected override void WndProc(ref Message m)
        {
            if (m.Msg == NativeMethods.WM_ERASEBKGND)
            {
                m.Msg = NativeMethods.WM_NULL;
            }

            base.WndProc(ref m);
        }

35. Example

Project: rallets-windows
Source File: ConfigForm.cs
View license
protected 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;
            }
        }

36. Example

Project: rallets-windows
Source File: LoginForm.cs
View license
protected 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;
            }
        }

37. Example

View license
protected 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);
        }

38. Example

View license
protected override void WndProc(ref Message m)
        {
            if (_sirenOfShameDevice != null)
            {
                _sirenOfShameDevice.WndProc(ref m);
            }
            base.WndProc(ref m);
        }

39. Example

Project: HostsFileEditor
Source File: MainForm.cs
View license
protected 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);
        }

40. Example

Project: GEDKeeper
Source File: BaseWinSDI.cs
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();
            }
        }

41. Example

View license
protected 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);
        }

42. Example

View license
protected 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);
        }

43. Example

Project: AudioSwitch
Source File: FormOSD.cs
View license
protected 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);
        }

44. Example

Project: onesafe
Source File: Form1.cs
View license
protected 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);
        }

45. Example

Project: log2console
Source File: GlassForm.cs
View license
protected 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 );
        }

46. Example

View license
protected 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);
        }

47. Example

Project: pass-winmenu
Source File: Program.cs
View license
protected override void WndProc(ref Message m)
		{
			base.WndProc(ref m);
			// Pass window messages on to the hotkey handler.
			hotkeys?.HandleWndProc(ref m);
		}

48. Example

Project: ynoteclassic
Source File: DragForm.cs
View license
protected override void WndProc(ref Message m)
        {
            if (m.Msg == (int) Msgs.WM_NCHITTEST)
            {
                m.Result = (IntPtr) HitTest.HTTRANSPARENT;
                return;
            }

            base.WndProc(ref m);
        }

49. Example

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

            if (WndProcMessage != null)
            {
                WndProcMessage(ref m);
            }
        }

50. Example

Project: Vocaluxe
Source File: CDrawWinForm.cs
View license
protected 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;
            }
        }