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 — 314 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

      • Sometimes I bother to post the application for their approval to be cleaned, with a lengthy description of why it even exists in the first place; but most other times I don’t even bother. I mean why? If they can’t even fix this most simple bug after many years, why could I expect their antivirus to be any more competent?!

  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 πŸ™‚

    • I assume you’re referring to a Windows Update? I bet it’s Windows Defender as it just flagged on me as I checked this. Note, it only cried about the installer, not the app: –

      https://i.imgur.com/ipxRrh5.png

      I am getting pretty annoyed at the extreme paranoia and absolute stupidity of these scanners. Especially Microsoft, who has not only caused this problem they aren’t solving (sticking corners), but still flagging this solution after I have contacted them multiple times about this application and each time they’ve declared it is safe.

      Anyhoo, check it still exists and running. If it is there and not working try the debug version in the main post and see what it’s saying.

  9. I mean I have it installed but windows still stick to the edges. Its running and everything in task manger. Disabled Virus protect and tried the installer as well no go. It still stops on the edge of the screen with a circle if im not moving the dumb mouse super fast. Dumbest feature in the world.

  10. The program seems to be working perfectly, part from with having firefox highlighted. Whenever I have a firefox window highlighted it won’t cross over to my second monitor.

    Super annoying as I run my screens like this
    https://puu.sh/ybPax/cafc08b508.jpg

    due to not wanting the mouse to jump over when playing certain games. Impossible to run that layout without this program. If you know if there’s a way to get around it without having to tab to another window everytime, let me know.

  11. Can I check one thing with you before I get Firefox and change my displays to test; are you running it as Administrator for any reason?

    If that’s the case there is the “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” issue.

  12. Yeah, I’m running everything with admin privileges. Noticed that it’s the same when having task manager highlighted, so you seem to be right about the highlighted thing overwriting the privileges.

    Just not sure how to set NSM to run as the highest then though. Just switched over to win 10 the other day, and it’s just making me want to pull my hair out with how restricted some things are, and not being able to disable other features as well.

    • It need not be highest, just the same level, so if you edit the properties of the NSM shortcut in StartUp you can turn on that switch called “Run as Administrator”. If you get stuck doing that let me know and I’ll post a couple of screenshots – I’m just replying with my phone here!

  13. So I have 2 monitors that are different resolutions. With this program, I can move the mouse from the smaller monitor to the bigger monitor at the corner with no problems. However, the cursor still gets stuck in the corner when I move the the cursor from the big monitor to the small corner. Is there any fix for it?

        • That 155 overlap is what is doing it I expect. So either you can adjust that and physically move a monitor to match, or you just have to remember to drop the mouse by that much to get it back across.

          • It seems like only the top and bottom 5 or so pixels gets stuck. The cursor still manages to cross over to the smaller monitor for most of the 155 pixels that overlap still manages to cross over. More incentive to get another 1440p monitor I guess.

        • Comments can’t nest more than 5 deep so I reply to this one!

          I’ve made you a special build where I increase the fudge zone for you, specifically the hoplimit & range constants. Source code reference: –
          http://www.jawfin.net/download/NonStickMouse.dpr
          is now
           const
             hoplimit=60; //was 30
             range:integer=16; //was 8

          With any luck we can fake it over the difference! Get from: –
          http://www.jawfin.net/download/NonStickMouseTrev.exe

          Cheers πŸ™‚

          • Thanks, really appreciate it!

            I’ve given it a try, it still looks like it’s catching on the top and bottom 5 or so pixels while crossing over to the left monitor. Maybe need to increase the range a little more?

            Here’s a picture of the monitor setup, hopefully that helps. https://imgur.com/a/KRPFi

          • I tired setting monitor 1 higher so that it lines up with the top of monitor 2 and it did manage to work.

        • I’ve implemented a shortcut into this round-about πŸ™‚
          I’ve made those 2 variables changeable via command-line parameters so you can experiment with what will work.
          Note that the bigger the number the higher the chance of a misfire.
          Firstly, get your latest version: –
          http://www.jawfin.net/download/NonStickMouseTrev.exe

          Now in the shortcut that runs it you put command-line parameters in for their values. The first number is the range as I consider that more important. hoplimit is the second number, it probably doesn’t need to change but I put it in there just in case. So the properties of the shortcut would look like this: –

          Non-stick Mouse Properties

          Let me know if that doesn’t make sense!
          If you want the source code for the changes just say and I’ll post them.

    • Ah sorry yea, this is the properties of the Shortcut to the executable. So the shortcut I am referring to is the one you’ll have [or want] in your startup folder. To get there you can do Start/Run “shell:startup” like: –
      https://i.imgur.com/o3VS8xW.png

      In there create a shortcut the NonStockMouseTrev.exe wherever that happens to be. Then change the properties of the shortcut. To experiment with different numbers terminate the executable with the Task Manager, change the shortcut properties and re-run it.

      I went with this solution as it allows you to set permanent values and the app still does not access the hard-drive or the registry.

      • Thanks, I’ve played around with the range for a while now and it still seems to be stuck for those 5 or so pixels at the top and bottom.

        I think it may just be that the monitors have different resolutions. When I set both of them to 1920×1080, the cursor won’t get stuck in the corners. When I set the main monitor back to 2560×1440, it gets stuck.

        Not sure where to go from here.

  14. Thank you!! This is insanely annoying. Not only does this fix the sticky corner problem, but also the problem of the window getting stuck when dragging to a second because it wants to snap to the side of the first one. I thought those were two separate, horrible problems, but this fixes both!

    Windows 10 is hard to love, it’s got a lot of improvements but also a LOT of horrendously annoying problems. But people like you are fixing them, one amazing change at a time πŸ™‚

    • It’s my little bit. I’ve been using windows since Windows 3.1 for Workgroups. There’s no doubt Win10 is the best so far, once you install ClassicShell, and apply a dozen other tweaks – most of which Microsoft supports.
      I’m glad I could help πŸ™‚

  15. This is great, thank you for removing this constant irritation! It’s a shame mighty Microsoft cannot manage to do this for themselves…

Leave a Reply

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