Non Stick Mouse in corners of Windows 10

Use this application to disable or bypass the sticky corners in Windows 10 for dual displays or multiple monitors. What it does is hop the mouse over the sticking corners, as well as the screen edges when moving windows. Thus it allows the dragging of windows through screens without your mouse getting hijacked by the Snap Assist.

The Hot Corners and Snap Assist still work, but now only when you want them to.

Latest Version released on 16th of July, 2017.

I’ve been asked for an installer so it can run automatically on boot – so here it is, an installer: –
Click to download NSM setup

Here is the actual application itself if you wish to save it directly and run it whenever you wish: –
Click to download Non-stick mouse

And for your peace of mind, the full source code written in Delphi. Its simply one file as its a console application: –
www.jawfin.net/download/NonStickMouse.dpr

This application does not read or write to any drive, it does not access the registry or connect to the Internet.
I am only sharing this as I took the time to write it and I notice many people are annoyed by these Microsoft “features”.

The second download is the application itself. It is a console (or windowless) application – so to terminate it use the Task Manager. It is not designed to be overly clever, it does not have a notification tray icon.
If you want it to run on start up make a shortcut to where you have saved it in the start up folder, or use the installer!

If it is does not work at all please let me know and I will try to fix it when I have time.
One detail to note: it won’t fire when the active/topmost window belongs to a process which is running with privileges elevated higher than what NonStickMouse itself is running with.

Subsequently I have also developed a debug version: –
http://www.jawfin.net/download/NSMDebug.exe
This has a User Interface showing the screen dimensions and offsets of each monitor, the mouse tracking, and the values it was at when the last hop was fired. This application will also hop the mouse so for complete accuracy please terminate NonStickMouse.exe when using it.

You may choose to compile this yourself for your own sense of security – in which case follow the instructions here: –
http://www.jawfin.net/?page_id=143&cpage=3#comment-16517

Developed by Jonathan Barton

As has been requested on numerous occasions, here is a donate button!

Just put whatever you like in the Price per item box 🙂

Disclaimer: Jonathan Barton is not responsible for any damage or presumption of damage caused by this application. All information here is to be considered advice of which you may chose to act or not act on; this includes compiling the application yourself. As one guy said, you received free, give free – this application cannot be repackaged and resold for commercial gain. You may contact me if you see an opportunity for this. Consider this paragraph as the End User License Agreement – which can be changed at any time without notice.


Comments

Non Stick Mouse in corners of Windows 10 — 275 Comments

    • I can’t reply to your last post as this site only supports nested comments 5 deep – so I’ll write here!
      The older version and the one I just did has very similar code – I just made the range constant available for you to adjust.

      I know this may sound like a compromise (but only because it is); what would happen if you switched in the video cables in the back of your computer so the primary monitor is on the left and the secondary to the right? So the physical cables reflect the physical monitor placement. It shouldn’t make any different, but I just feel it may help.

      I have found the range of 8 pixels seems to be Microsoft’s hard-coded gravity zone, which is why I need to pop it away from the top as well as the side. In fact, if I didn’t move it away from the top MS will snatch the mouse back and jam it back into the corner – I have even tested this by moving it 1000px on the X axis but nothing on the Y, and it still snaps back.

      Me teleporting the mouse it’s what is saving it, it is where I am moving it to! MS doesn’t differentiate from software moving the mouse, or the user. I also suggest trying to re-align the monitors in the settings using this technique: –
      http://www.jawfin.net/?page_id=143&cpage=2#comment-15310
      Whereby you overlap the screens and align the tops then let it go for it the auto-align. I know the debug version is showing they are aligned, but can’t hurt to try! Even being 1 pixel out would account for the missing mouse.

      Even still, it should not do that flicker dance in the corner – that’s a hard one to mitigate, but I thought I had it fixed.

      Finally, do you know if you are using any DPI scaling on the monitors, or on the computer itself, or on specific applications? Although I haven’t been able to duplicate the issues people have had with that, it can mess up the positioning on the new screen. And sadly, I can’t replicate what you’re seeing either! That vertical jump should be lessened when the look-ahead is activated. You can also try the latest actual NonStickMouse application itself as I have now incorporated those changes back into it.

      Let me know how all that goes, but I fear there may not be much more I can tweak here.

      • I re checked my alignment, it’s ok (https://puu.sh/wL4Pg/3afadc2b9a.png) From win/reg/nvidia all ok.
        Tried to swap primary displays… nothing changed. Also the cables as you said… nothing. The problem on the top and bot corners persist.
        I also checked it on another PC, and the same problem exists (maybe different builds have different bugs aka ‘features’ =/)
        No DPI scaling on any monitor, this is a fresh install (1 week old), so it has almost no apps yet.

        I tried all the versions you uploaded, and the only one it works 100% is the first debug exe (The one that teleport my mouse horizontally AND vertically away from the corner) (https://puu.sh/wL4R2/6bcc48f4e8.7z)
        If by any chance you still have that code and can implement the hide button I will be very grateful.

        Thanks again for all your time you spend on this project and helping random users like me.

        • I’ll see if I can find it – but that’s not the kind of thing which usually gets archived sorry 🙁
          As another test, try just swapping those screens on the “Customize Your Display” – meaning when you run your mouse off the top-right corner of your right monitor see if it appears in the top-left corner of your left monitor! I just want to check the behavior when the primary monitor is on the left.

          I’ll fiddle more with the debug (i.e. give you more options), see if I can’t recreate what was working!

          • I tried swapping positions and nothing changed.

            To put it simple:
            https://puu.sh/wLtWl/3d8955d81c.png
            I can move freely through the blue line, but not through the red parts (top AND bottom). I mean, if I go fast there is no problem, but at normal speed it snaps to the corner =(

        • Nested comment issue again! OK, try increasing that “Limited to distance (pixels)” number to say 2000, then try 0. Not sure what it could do for you, but moving at speed is where that code applies.

          • Nope, nothing.
            And I was wrong about one thing in my last post. If I move the cursor through the red dots, no matter how fast I move it, it wont go through.

            Like this other user said:

            “If you drag the window to the second monitor through the top then it’s going to snap on the top left corner of that current monitor no matter how quickly you drag it. Same goes for the top right and bottom left and right.
            If you drag it through the middle slowly, it’s going to snap on the left side of the current monitor. Same goes for the right side.
            If you quickly drag the window through the middle then the window will make it to the second monitor without a problem.”
            Source: https://www.reddit.com/r/windows/comments/3h6wod/windows_10_mouse_cursor_sticks_to_edge_between/cu555ko/

            I Just need a way to teleport my cursor a few pixels vertically, like the first debug exe I tested (the one I uploaded).
            Anyway, I’m happy using that one. I can’t hide it, but at least it works =)

          • It works!!!!

            “Screen Select: None if not valid”

            or

            “Use some old code I found lying about!”

            If y check any of those 2 options it works like I wanted!

        • Can I check then, does that work for “Current screen via: MultiMon DLL” ?
          Only because that is actually the settings within NonStickMouse itself!
          in case CloudFlare sent you a cached copy of the installer I’ve cleared the cache, so please try this one again!
          http://www.jawfin.net/download/nsm_setup.exe

          If for some reason it just does not want to cooperate I’ve recompiled the debug version so “none” is the default – then you can use that version with the “hide” parameter/filename trick!

          Heh, and I was just about to write another application which finds the debug window and sends a hide command to it – antivirus doesn’t like apps doing that, but it would have worked if all else failed!

        • Bah, I’ll just write you an app which will launch then hide the Debug version which works!!! I’ll post the source code too as interfering with another application is something a virus scanner really should care about, so expect some false positives.

          • I sorry this ended up in so much work =(
            You must really love programming man, I envy you.

    • Okay dokey. And no drama, getting it working is what counts!

      Get this application: –
      http://www.jawfin.net/download/HideDebug.exe
      Put it in the same folder as the NSMDebug you want to run.
      Ensure the NSMDebug has the filename of “NSMDebug.exe”
      Make a shortcut to HideDebug in your start up, and it should be all good to go 🙂

      Here’s the source code for it: –

      program HideDebug;
      uses
        ShellAPI,Windows,SysUtils;
      var
        h:THandle;
        i:integer;
      begin
        h:=FindWindow('TFrontFrm','NonStickMouse Feedback');
        if h=0 then //not running, we fix!
          ShellExecute(0,'open',PChar(ExtractFilePath(ParamStr(0))+'NSMDebug.exe'),'','',0);
        i:=0; //wait 10 seconds or so
        repeat
          h:=FindWindow('TFrontFrm','NonStickMouse Feedback');
          if h>0 then
            break;
          sleep(100);
          inc(i);
        until i>=100;
        if h=0 then //no joss
          exit;
        ShowWindow(h,0); //hide the screen, and then the taskbar thingy
        ShowWindow(FindWindow('TApplication','NonStockMouse Feedback'),0);
      end.


      Ewww: that layout… I try to tidy up in this edit box thingy I have here..
      Nup, still ugly – I’ll try try to make it readable without the indenting.
      Got it, spammed a bunch of &emsp to do the trick 😛

      • Fantastic!
        Already using it with no problems =)

        Thanks for all the quick replies and the hard work.
        If you want me to test other apps or future builds just let me know, I’d be glad to help!

      • Also, please accept my donation. Is not much, since I’m from a 3rd world country and my local currency is very weak, but I hope it’ll help =)

  1. Hi,

    very nice and absolutel neccecary program, thanks a lot. It works in almost all cases except for when UAC-windows pop up. I fully get why that is, but is there a possibility to run it with high enough privileges to get it working even than? I tried running it as “SYSTEM”, but it seemed not to work then.

    Best regards
    HBart

    • Understood. And I don’t think *anything* can [or should] run shotgun on a UAC. You may find it runs at kernel “NT AUTHORITY\SYSTEM” level, I’d have to research it! Fortunately these happen comparatively rarely, and there is only one task to do, click a button, but I could imagine if your monitors are set diagonally that would make it impossible. In which case, you can use the keyboard; left and right arrow to change the option [Yes | No] and Space or Enter to select it.

      You can’t even bring up the Task Manager while a UAC is showing therefore any program which even could run must be on ring 0 – like OllyDbg or x64dbg. So this is something we’ll just have to put up with.

      Note it could still be possible. But it would require a MS developers license for windows drivers, then have the app signed by MS as trusted (with a third-party certificate), then install it as a driver. At least, I think that is what it would take!

  2. Hi,

    Love the program. The sticky corners have been annoying me for a long time. Also, Chrome and Avast block the download as malware. Avast reports your site as being marked by many users as dangerous.

    • Yes, I heard of that one before. That’s roughly translated to “we couldn’t be bothered to do the research ourselves so we’ll just give some innocuous [and unproveable] message about many users reporting it as dangerous”.

      In fact, I got that exact message on an app I wrote for a specific group of people, and only provided the download link to them, and Avast gave them that same error. It was only downloaded like 6 times by people I know personally – it’s sad when a supposedly respectable company resorts to such deception – and we are to trust them with security!

      Chrome doesn’t block for me, perhaps its an Avast plugin which is firing it.

      Nevertheless if you’re concerned (and it’s only correct that people should be) you can follow the process here: –
      http://www.jawfin.net/?page_id=143&cpage=2#comment-16164

      Thanks for your kind words 🙂

      Cheers

  3. Thank you, so much.
    The amount of times I’ve accidentally closed a window while trying to click on the 2nd window… I can’t even!

  4. It doesn’t seem to work on the vertical edge. I have two monitors arranged vertically and it sticks in between them still. Any ideas why?

    • I found that the issue was with my monitor arrangement in display settings. I left a gap between the monitors to make up for the portion of the monitor that is plastic and not a screen. That gap made it think I wasn’t on the edge. The vertical distance between monitors would need to be increased.

      • fixed it by adding a verticalRange constant with a value of 140 and changed code to use that when going up or down
        https://pastebin.com/s2LRvW63
        I have two horizontal monitors arranged vertically and one vertical monitor to the right of the stacked horizontal monitors, thus to align the two left monitors with the right a space needed to be added between the two monitors vertically and thus the range needed to be increased.

        • Nice one on solving it 🙂

          Sorry for the delay in approving your comments – I sometimes rarely get undesired comments and have learnt to deploy this filter.

          I guess this could still be solved in code – not by adding a bigger fudge, but working out which ranges on the borders relate to the range of border of the next monitor. So instead of me testing if the mouse will appear on the next screen if casted, I check to see if its in a crossing range and just hop it. This would be far more complex and could have all sorts of problems – like one edge of one monitor could cast to 2 or more monitors – thus ranges per side.

          Let me know if your 140 fix is having other undesired side-effects and I’ll try this edge matching approach.

  5. Hi, I love your program but I’m having a slight problem. I have two monitors, primary on left is 2560X1440 and secondary on right is 4K 3840X2160. I have the left side top aligned with right side top so the tops are even but that leaves about a 40% overhang on bottom where going from right monitor to left hits a hard wall. I checked the debugger and it lists the pixels of the left monitor as 2560X1440 but the right as 6400X1830. Im not sure why the right monitor is reading as so large in the debugger. I’m thinking this is the problem but may be way off. A temp solution to make it not so bad was to align the left monitor in the middle so the hard edges are a little at top and a little bit at the bottom that way it’s not as noticeable. Any help you could provide would be greatly appreciated. Can’t believe Windows has yet to fix this.

  6. Not working for me… I tried disabling Windows Defender Protection, disabled Malwarebytes… I execute the program and nothing happens. Still very stick corners.

  7. This little program worked a treat!
    Thank you so much, I have been cursing that behavior and did not even know it had a name.
    Please accept my donation for such a great program with my thanks.

    FYI, Windows Defender wouldn’t let me download the installer, said it was a virus, so I just downloaded the .exe and it works fine.

    • Much appreciated too, thank you so much for your consideration 🙂

      The install is a plain inno setup of basically one file and a short-cut to it (oh and a registry uninstall entry)!

      If Defender is jumping on that then I can’t imagine what it’s not flagging!

      Thanks for writing

  8. The Lazarus Solution!

    Due to the growing number of false positives I thought to write a quick how-to compile it yourself.
    This way you can use the raw source code to generate the Non-Stick Mouse application.
    The code is [relatively] simple and well documented, meaning you can look through the code line-by-line (or get a knowledgeable friend to do so) to re-assure yourself it contains no malicious activity.


    1. Download the free Pascal Lazarus compiler from http://www.lazarus-ide.org/index.php?page=downloads
    2. Install it!
    3. Download the NonStickMouse source code (1 file) http://www.jawfin.net/download/NonStickMouse.dpr
    4. Run Lazarus and do File/Open and locate the downloaded NonStickMouse.dpr
    5. Execute application by pressing F9
    6. Having satisfied yourself it is working create a shortcut in StartUp to the NonStickMouse.exe Lazarus generated

    Note though, if AV’s cry about my version they will about yours too; be assured it is a false positive and add it to the exclusions.

    Final point: never, ever run an application on your computer unless you feel 100% safe with it (which also applies to the Lazarus compiler).

    Give me a holler here if you try this and get stuck – I’m happy to help 🙂

Leave a Reply

Your email address will not be published. Required fields are marked *