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.
Note: A user has reported this app got falsely flagged as a game cheating app – which may cause issues for any Blizzard or Activision games, such as CoD.
Latest Version released on 15th of June, 2020.
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
VirusTotal (0 out of 89)
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
VirusTotal (0 out of 89)
And for your peace of mind the full source code written in Delphi, 3 files on GitHub.
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”.
It hides its window – so 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.
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.
In an effort to minimise misfires this take parameters of when to fire: –
“corners” – only fires when in a corner (thus dragging a window across screens will stick).
“lag” – a delay between firing the hop. The default is 500 milliseconds but that can be overwritten by putting a value after the word lag.
These parameters can be affected by being emedded in the filename itself, thus renaming “NonStickMouse.exe” to “NSM_Corners_Lag_200.exe” will activate both, with a delay of 200ms. Use as required.
Subsequently I have also developed a debug version: –
(Consequently, due to the mindless stupidity of virus-scanners, of which I’m not even going to bother to try to counter, I took it off my site. If you need this app to help diagnose your issue please let me know and I can make it available for you.)
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: –
Developed by Jonathan Barton
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.
Look at this:
Old debug exe (10-07): https://puu.sh/wKOPA/dfdb6f9e65.mp4
New debug exe (16-07): https://puu.sh/wKOVg/bf04cd0d10.mp4
Sorry, I missed approving this post when I was out. And as WordPress decided to throw a page here I refer you back to this answer which I hope solves it for you: –
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: –
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:
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.
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.”
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 =)
Debug version updated, more switches to play with! I am kinda just groping around now for a solution!!
I put hints on the controls which affect the behavior of other settings.
“Screen Select: None if not valid”
“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!
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!
Yes, it works with MultiMon DLL. Without it stucks in the corner.
This version doesn’t work 100% of the times. I’ll said like 70%
There is some strange behaviour when I move a window: https://puu.sh/wLxb5/4f4ecc10e8.png
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: –
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: –
if h=0 then //not running, we fix!
i:=0; //wait 10 seconds or so
if h>0 then
if h=0 then //no joss
ShowWindow(h,0); //hide the screen, and then the taskbar thingy
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 😛
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 =)
Much appreciated mate. I do consider it generous and am very grateful, thanks 🙂
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.
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!
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: –
Thanks for your kind words 🙂
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!
Just wanted to leave a big “Thank You” man! 😀
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
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.
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.
I can only guess its a DPI scaling issue. And, about every single version of Windows handles it differently, even the latest Creator and Anniversary updates are different again.
I can only suggest doing Google searches for DPI scaling for multiple monitors for the version of Windows you are running. From that you may get some settings you can tweak to fine-tune it. In the latest version of Windows these settings are in the Control Panel / Display – but older versions of Windows can have these as Properties for the actual .exe itself, in this case NonStickMouse.exe
It may be on the compatibility page or somewhere else. If it is there hopefully there will be a switch called Disable DPI scaling.
I don’t know if they will help, but here’s some results: –
Ahh I assumed it was a dpi scaling issue and previously tried to disable DPI scaling in the exe compatibility. Thank you very much for your suggestions and also for taking the time to create something that solves a problem and not just give it to people but help them with all their questions. You rock.
Avast is flagging the program as malware. Can you please confirm?
I can confirm that Avast is stupid and lazy enough to do this.
In the past NonStickMouse has fired other anti-virus. It would seem using an application to move the mouse is now malicious activity.
For your own peace of mind you can follow the process regarding Lazarus as described in this comment: –
I’ve given up on trying to pacify paranoid anti-virus!
But, for a giggle, I ran it through VirusTotal again: –
Ironically, the more cleaner and simpler I make it, the more anti-virus goes into a fit.
Take a case in point, the debug version of this app has the exact EXACT same code in it, but because its a hulking interfering application and not nice and tidy the AV’s love it. If I ever had the desire to write a virus you can be completely sure it would never, ever get detected – those scanners are just so clumsy!
(Edit: Final irony, the scanner for Avast tied to VirusTotal cleared it… go figure!)
Not working for me… I tried disabling Windows Defender Protection, disabled Malwarebytes… I execute the program and nothing happens. Still very stick corners.
That is odd. Let’s see if we can resolve this. Run the debug version: –
And please post a screen shot of that application. If you’re not sure how to do that just say and I’ll write up a how-to 🙂
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
Your files show trojan-positive for a bunch of antivirus software:
Windows Defender also picks this up though as a trojan vagger
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?!
Nevermind, saw too late this has already been addressed. Still will give it a skip 🙂
Perfectly fine solution 🙂
Still, if this bug annoys you enough to act then follow the directions to compile with Lazarus yourself explained in the post below!
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.
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 tried compiling the source code but I get an error.
Compile Project, Target: NonStickMouse.exe: Exit code 1, Errors: 1
uNSM.pas(221,26) Error: identifier idents no member “handle”
Oh, completely my fault. Since I changed the app to be a non-visual form app (to stop triggering the AVs) I didn’t retest in Lazarus. I’m out of town for a few days but I’ll right on it when back and post again. Sorry for the inconvenience, cheers Jonathan
Righto, back in town, and fixed that issue. Lazarus does not have handle property for the application object, so I found another means to achieve hiding the app and put those in compiler directives in the source code (on Github).
I think it’s blocked by Thirtyseven4 EPS. 🙁
You mean, after you download the source-code, and the compiler, and compile it yourself, and it’s still blocked by an AV? Makes sense, though, if they block my safe program why limit themselves there??!?
I can only suggest checking the source code carefully, note my comments do relate to the code – and it is safe – then add it the the AVs exception list.
As always though, don’t run anything you don’t feel comfortable with.
Works fine going to my second monitor on the right. However going back to my main monitor on the left, it snaps on the top left of the second monitor and won’t allow me to get through.
Yep, I can see what it is. At least, I think I can! On the debug window note the Top offset of the second monitor is showing -26, it really wants to be 0. Please have a look at this comment to set that: –
If that didn’t help / not make sense or anything else, let me know 🙂
Sticky edges no longer disabled after update.. cant get to work anymore driving me nuts.
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: –
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.
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.
I agree it’s a serious pain!
When you get the chance, please try the debug version: –
And post a screenshot of it. If you’re not sure how to do that let me know and I’ll write up a quick how-to.
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
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.
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.
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!
Yeah, I’ve done that already, didn’t seem to fix the issue.
I was thinking about what i said when I recalled doing this may stop it from running as its not possible to set an administrator app in the Start Up. It has to be done via the Task Scheduler, here’s the process: –
That one should do it!
Not that I want to tell you how to run your computer, but no user applications should require running as administrator, especially a web browser. You’ll find what the issue most likely is will be the file system [or registry] security is not set correctly for it.
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?
It’s possible that on the way back it’s below the other monitor thus it won’t jump. If you can post a screenshot of the debug version I may be able to figure out what it’s doing.
It looks like it’s only catching on a few pixels at the top and bottom going from the right monitor to the left.
Thanks for the prompt response. here’s a screenshot. https://imgur.com/a/rj4E0
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: –
hoplimit=60; //was 30
range:integer=16; //was 8
With any luck we can fake it over the difference! Get from: –
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: –
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: –
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.
Sorry, I don’t see the shortcut tab in properties. I only see the other 5 tabs.
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: –
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.
Can you please run the debug version again, put the mouse in the corner it is sticking, and while there grab a screenshot of the debug window. With the resolutions and the mouse position it shows and the last hop info (from when it came back) I still may be able to rig something up for you. Thanks 🙂
Edit: and as it’s sticking in more than one corner please do a screenie for each, cheers!
The first one is the bottom corner and the second one is the top corner.
I’ve made a special build hard-coding those numbers! Hopefully it’ll fire with that!!
If it’s still not happy and you prefer we can email or Skype, as this is a bit clumsy for communication. Cheers
Same result unfortunately. Is there a way to send you my email without posting it in the comments?
Bah, well, you can email me at firstname.lastname@example.org 🙂
For the sake of anyone following this thread, our issue got resolved via email and NSM is working for Trevor how he likes it to 🙂
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 🙂
Thank you!!!! You’ve made my life a little bit better!! 🙂
Then the privilege is mine 🙂
This is great, thank you for removing this constant irritation! It’s a shame mighty Microsoft cannot manage to do this for themselves…
10/10 works perfectly, thanks
I’m trying to download nsm_setup.exe in Chrome, Win 10, but Windows Defender blocks it saying:
Alert level: Severe
Apologies, I see you have addressed this a billion times already!
Hey, thanks for the very helpful program.
Completely no problem 🙂
Thanks for reporting it – on occasion I go mad and have it white-listed – but it’s kinda pointless, it just gets flagged again haha.
I was able to download the exe and it worked, the installer is being blocked from installing on the latest version of Windows 10 17083, but no problem. All my locations have dual monitors and this solved the problem on both of them. Worth a donation, good work!
I’m glad it’s behaving 🙂
Um wow – no kidding on the donation. Thanks so very much. Obviously give me a shout if you have any problems with it, or anything!
according to VirusTotal 23 out of 65 engines detect a trojan in NonStickMouse.exe:
can’t edit, so I’ll reply:
I see Jonathan explained this already, so it might just be false positives.
Haha yea. Whadda reckon, I push for the whole 100% false positive? It seems I’ll have more luck doing that then getting it cleared! Time was when it was 0/63, the code hasn’t changed – I mean, what it accesses, the library calls, only the algorithm has been tweaked.
thanks for this program. It works fine except the bottom corner is still sticky. However the upper one works fine now. Do you have a fix to make both corners works?
If I had to guess I would suspect that your 2 monitors are of different heights, so when past the overlap it won’t return as technically there is no monitor there – only above it. In that if another screen was put below the one its not returning to, it would go onto that screen, thus filling the void. This is the typical and correct behaviour.
But, that doesn’t mean we have to like it! I can write a specific app for you to manage that jump, but for me to have the exact co-ordinates could you please post a screenshot of the debug version here: –
Using imgur.com or some such website. Then I can confirm if my guess is right, and will have the coordinate numbers I’ll need to program it for you.
I seem to have a similar issue myself. My main monitor’s corners are outside the bounds of my other two monitors so it still snags on all four corners for it. Since the app seems to know which screen is next to a given monitor wouldn’t it be best to have it jump to the most relevant point on the monitor associated with that direction from the current one?
That’s almost, but not quite, how it works. What it does is look at the mouse’s current trajectory, and hop it automatically on to the monitor to where it was going. So, if where it was going is outside the scope of the next monitor it will not detect any monitor, and thus not hop. It’s not working out the boundaries of each screen and checking the overlap, it merely casts on its current course and hops to the next monitor if it is there.
It occurs to me though you could try running the debug version and it has a switch called “Screen select: Closest to mouse”. Choose that and if it behaves as you want please let me know!
The debug version is actually what I was basing that idea off of. (The option you mentioned doesn’t seem to actually change the behavior in any way for me.) The table is shows has bordering screens defined for each direction. What I was thinking was that it could just choose the screen in that direction from the one you’re currently on. So if I’m moving left from my primary monitor (monitor #1 in the debug version) to the one to its left (monitor #0) it would see that I’m moving off monitor #1 in the direction of monitor #0 and it would go for that one automatically.
*Replying to your previous post as comments can’t be nested any deeper*
I did try to design the app so it kept track of which monitor touched other monitors and at what range of the edge[s] it does so – but that was like tracking a veritable jig-saw, only with the possibility of having gaps in the jig-saw too!
In the end NSM just fixes the MS bug. So if there is no monitor to where the mouse is moving (as the desired one is above or below that position) it still would not move, jammed or not.
But, having said that, I can hard-code teleport parameters so if the mouse finds itself in a set location I’ll jump it anyway. That is not the correct behaviour, but hey, we want the computer to work for us, not the other way around!
So if you can please post a link to a screenshot of the debug version running on your computer (like using http://imgur.com ) I can get the offsetting coordinates from that, and build you a custom install which checks for those and will fire the hop 🙂
There you go.
Get from: –
You’ll have to manually terminate the current running NonStickMouse.exe and replace it with that one you download. Let me know if you get stuck with moving files around in explorer etc.
I can’t actually test these settings, they are for your layout exclusively!
Just for your reference here is the code change for this, put into the function CanMove()
if (pt.X=0) and (pt.Y<=205) then //top left
if (pt.X=0) and (pt.Y>=1285) then //bottom left
if (pt.X=2559) and (pt.Y<=347) then //top right
if (pt.X=2559) and (pt.Y>=1115) then //bottom right
Great, thanks! Looks to work perfectly now.
You may want to know that there is a potential false positive that raised alarms with my IT department today.
Mon 26-03-2018 09:59:51.0030 Infection detected: c:\users\mug\downloads\nonstickmouse.exe [SHA256: 4F9F99121284F7D36102D5001075ECE7C0989CCB99D5DFC783C1515EDCAF1B6C] [MD5: AA2F110C6F6F5015F7294255F21AE984] [3/00000000] [W32.Trojan.Gen]
I hope you didn’t get into any trouble for that!
You’ll note this page is full of false positive reports now – it would seem code I wrote years ago now looks like some new trojan. If it helps in satisfying your company policies you can always download the source and compile it with Lazarus (see top post for link to details).
Bah, I must be losing my touch. The latest Virus scan now only hits 13 out of 65 false positives.
It’s almost enough to give one confidence in the competence of AV companies.
Edit: And the saddest thing is doing a search on the most popular result (6 of the 13) of the definition “Gen:Trojan.Heur.DP.cKW@aWgijTb” yields: –
No results found for “Gen:Trojan.Heur.DP.cKW@aWgijTb”
It seems to me they are all stealing each others virus definition files so that none of them actually know what the identifying signature means, let alone provide an explanation for it.
Here, try it yourself: http://www.google.com/search?q=cKW@aWgijTb
With any luck, a search of cKW@aWgijTb will now come back to this actual post!!! Because right now cKW@aWgijTb returns no results in the search.
Did I mention cKW@aWgijTb ?
*cough* cKW@aWgijTb *cough*
And I’m done 🙂
WOOHOO!!! A Google search of cKW@aWgijTb comes back to this site, and only this site. Which means I am now the author of a virus that doesn’t exist and isn’t a virus. I have just founded vapour malware, and have 13 different antivirus suites to validate my claim. Can’t get any more credibility than that.
On this topic, I’m actually thinking of rewriting the delivery of NSM so its a service, self-installing, but still only 1 source file. It will automatically run as admin, be auto-launching – and may even build an uninstaller, all within the same executable. But, its a lot of work to basically [hopefully] bypass stupidity – thus my lack of motivation to do it.
NSM is detected by McAfee as being malware, i need a version that’s different so its not detected as the original application. This is complete BS of course. McAfee immediately deletes the application EXE upon installation.
Also, my business classifies the download link as being “malicious” just so you know, which is also complete BS but this time its not McAfee its Bluecoat.
Ah well, you can see my ongoing struggle with stupid antivirus. And that has obviously had a flow-on effect that if NSM is a virus then the site that hosts it must be bad too. I’d call that stupid squared!! But even still, grab the source off github and compile yourself if you like – that shouldn’t upset AV or web protection. Sorry I can’t offer anything better 🙁
Thanks for this terrific fix, Jonathan. It’s been a life saver. Unfortunately, it just recently stopped working for me, though. It began when I disconnected and reconnected both of my monitors, now nothing I do has fixed it, including rebooting, reinstalling, upping the process’s priority, installing and running as admin, etc.
It is doing something though – here are a couple of screenshots with it enabled and disabled.
I’d really appreciate any help – it’s unbelievable how impactful those few pixels are.
We’ll get it working!
Although the screenshots are great, they can’t tell me everything. I did notice that it “hopped” from monitor 1 to monitor 1 – an obvious bug in my code! Also, I’ve been a bit lazy and haven’t kept my debug version up with the exact same code I actually have in NSM – making it rather unhelpful.
So I’ve now brought it all up to speed, and re-uploaded it. You’ll see the screen has changed a bit. I’ve put in the monitors’ width and height, also in working with this I found a bug in NSM where it would fire 2 hops almost instantly, so I’ve fixed that too (which explains the Hop Count I put in so I could see if it jumps by 2). I took out some older settings which are no longer relevant.
So please try again with the latest debug version: –
Make sure NonStickMouse.exe itself is not actually running so it doesn’t interfere with the debugging.
I’m now working on a MSI installer for NSM as I’m sick of my AV hitting on my inno setup every time I open the folder. Once I got that working I’ll update NSM, the source code, and my original post on this page,
Here’s a screenshot with the updated debugger: https://puu.sh/Aj0U4/47e0d5fcb0.png
It appears as though NSM thinks it is hopping, while it’s not actually triggering. I’ve tried playing with the settings in the debugger and found that bumping the range up to 15+ and disabling Lookahead actually seems to mostly fix the issue, although it still catches occasionally from left to right.
I just don’t understand why it’s doing that! It could be some mouse acceleration settings, or perhaps you have a gaming mouse with some clever settings NSM isn’t compensating for – something like variable DPI could do it.
Nevertheless, if you find the sweet-spot with those settings, I can compile for you a NSM with those locked in. So if you’re happy with range 15 and no lookahead I can make that happen for NSM itself – just say so 🙂
Very small changes, biggest deal is changing the hop from 8 pixels down to 2.
It’s possible this may not work for everyone, so let me know if you install the latest version and the mouse isn’t hopping (also check the debug version layout to ensure you don’t have 1 pixel overlaps where the screens touch).
The debug version has also been updated to run off the same code.
I wanted to build a MSI format installer to stop AVs tripping over the inno setup file, but it’s a ridiculously huge amount of work just to install one file and create a start-up shortcut for it – so I haven’t bothered and just updated my current install.
Fun with AVs: https://www.virustotal.com/#/file/dd9aa12c17b15bcd4660edcd52d663946ff7fb0bc6279d5b09cd23ed0385d3c6/detection 15 yay!
And what? I get to invent another vapour malware virus – yup I am taking ownership of “cKW@ameBHC” as that is a “virus pattern” detected by 6 different antivirus scanners, for, you guessed it, a definition which does not exist. As per usual: http://www.google.com/search?q=“cKW@ameBHC”.
That’s right, no results. So, given I spam the pointless string cKW@ameBHC enough times it’ll get indexed by Google and I’ll be the proud owner of the only search result of cKW@ameBHC
Those AVs are such scammers, stealing each others definition files which link to nowhere, so if you’re using Ad-Aware or BitDefender or F-Secure or Emsisoft or eScan or GData you can be sure that at least all but one of them are thieves 😉
PS. I just checked, and you may be interested to know that so far there has been 23954 downloads of NSM. Woot!
I can not download either the NSM Setup or the non-stick mouse executable.
I get a “The connection was reset – The connection to the server was reset while the page was loading.” intercept page, and an AVG Popup “Threat secured … …infected with URL:Mal”
I was able to get the ‘.dpr’ after changing settings on my AVG.
Thank you in advance.
All I can suggest is to train your AV not to eat it as soon as you download, or disable the AV. Of course, please do whatever you feel most comfortable in doing. That may well be compiling the dpr yourself: –
Thanks so much for this little program. I unfortunately had to make the jump from Win7 to Win10 yesterday and this issue (among many others) annoyed the hell out of me. Wtf, Microsoft? Dumbass Defender marked it as a virus too, but I could just turn it off while I opened it.
Thanks again. Works great.
But that’s the amazing thing – such a fundamentally flawed bug, so easy to fix – I reckon a single line of code needs tweaking, and has gone uncorrected for sooo long. I’m not sure if it’s arrogance, stupidity, blatant indifference – it honestly floors me!
Thanks for putting work into this, it’s annoying me to no end when my mouse won’t go between my top and bottom monitor with significant speed & repeated attempts. Sadly I haven’t gotten to test it out yet.
Tried to run it and it got deleted immediately as a virus. I checked on VirusTotal and it’s seriously setting off alarm bells, 41 positive hits. Is the SHA on VirusTotal the same as your original file? I don’t see any listed on this page. I just want to make sure the file from this page is the correct one before I try and make any exceptions or anything. (Also found it weird it says “First Seen In The Wild 2010-11-20 23:29:33”)
41!! Woohoo, a new record. I’ll calculate the SHA for you, I didn’t think to bother with that before. But if you read the comments above you’ll see my ongoing struggle with AVs :\
Wow! Fast response! Thanks! <3
I forgot to include the link of my scan -.-
Pretty crazy how nuts things are. I have Windows SmartScreen, Defender, and Avira all go bonkers when I ran it O_o
*sigh* Windows Defender hit it as I was running FCIV >.<
And that’s after me contacting MS to have it white-listed, many times. Of course, if they were competent, we wouldn’t be running NSM in the first place 😉
I just can’t compete with stupid when it’s pushed at a multi-national level.
I’ll get the numbers now, but I’m going to rewrite this as a Windows Service.
Yup, that’s right, making it 10x more complex, and technically, 100x more with the capacity to abuse, and I’m sure the AVs will love it.
Thanks! <3 Seriously.
Maybe I'm silly but I like having the hash just to make sure files aren't corrupted/tampered. They match so I got the same thing you made. Ugh False positives.
I can imagine it's pretty frustrating. I appreciate the work you've put into this.
Thank you again! Have a lovely Day/Night Cycle.
Not being one to give up, I took a compromising approach.
I put the code (which currently is like a windowless console application) in a typical form application, and hid the form, and runs the exact same routine. It’s VT score is 1 / 67….. The exact same code…!
Anyway VT here: –
I put the executable here: https://www.jawfin.net/download/nsm.exe
And the source code, now there are 3 files.
The project, which is now full default (the compiler writes it) https://www.jawfin.net/download/nsm.dpr
The unit which contains the code https://www.jawfin.net/download/uNSM.pas
And the form template which is tied to the unit https://www.jawfin.net/download/uNSM.dfm
All are text files.
Note the timing is now handled by a timer instead of a dead loop with a sleep(50) in it. Exact same overhead on the CPU.
Let me know if this helps 🙂
Edit: The links are no longer relevant due to latest update I did
Exact same application only now it no longer modaless. To stop AVs flagging it (as they hate apps which have no visual representation) I now create a form which immediately gets hidden – so it’s the same app doing the same thing only more polite to the AVs.
Hi, unfortunately this doesn’t seem to work, going from my left to my right monitor it can keep dragging forever and it will never hop over.
Help would be appreciated, the process is running.
Your best bet is to install the debug version mentioned above, and post a screenshot of what it displays. This issue is usually caused by the monitors not being perfectly aligned – but this isn’t your fault, the User Interface in the Control Panels shows them to be aligned but fudges over a small number of pixels – which, unfortunately, is enough to prevent this app from running smoothly.
I’ve got a 3 monitor setup: 2560×1080 middle, 1920×1080 to the right and above. NSM works great in the green zones, but could you add functionality for the red zones as well? So going up from the middle monitor would place the mouse pointer in the corresponding corner of the upper monitor.
I can certainly do that for you 🙂
Just bear in mind this is not default windows behaviour, which is why it’s not present. That and with the confusion a bunch of layouts of monitors could have, there’s no reliable way of calculating these hops zones automatically.
Could you please post a screenshot of the debug version https://www.jawfin.net/download/NSMDebug.exe so I can have exact numbers which I’ll hard-code into the app? I’ll then post what actual code changed and a link to the new exe.
Thank you so much for your work on this. I will never understand why a behemoth like Microsoft can be so amazingly useless at addressing legitimate issues like this.
It’s just the sheer surprise factor that it hasn’t – I wrote this little app years ago to address an issue I figured would be resolved next update. It’s just beyond reckoning!
I tried using your program but it is not correctly recognizing the resolution on my laptop 4k screen. Running the debug version it is showing 1536 x 864 and it should be 3840 x 2160. It does correctly identify the resolution on the two external monitors (1920 x 1080)
That’s some kicking resolution you have going there – obviously I can’t duplicate this to test!
I suspect that it may have some kind of DPI scaling at the hardware level.
The best I can try is messing with DPI scaling and see if I can get a similar results.
Note that a github [bug] search shows this is an issue in many applications.
I’ll hve a play and let you know how I go, otherwise we may need an app which runs just above the hardware level to have it work.
Mini update, the issue is easy to duplicate by changing the “Scale and layout” field in the Display options – but it’s very hard to compensate for that.
I spent a couple of hours just even trying to programmatically find the monitor level scale; the latest version of Lazarus can do this – but still it displays the grid as you said.
I tried scaling the mouse position via the relative DPI, so in my case my left monitor (the scaled one) shows a width of 1280, which is really it’s true 1600 scaled by 125%. So scaling the mouse should have worked, in that when it was at 1279 it calculates to 1598 (or so) – I can’t be sure as it didn’t get that far. The routine which detects what monitor a coordinate it on would seem to round up to the next monitor – so when the mouse passed the 1280 the function Screen.MonitorFromPoint() reports it on the next screen, so either way it jumps to early or not at all.
This means I cannot rely on the Windows functions to located the scaled position of the mouse – either I write my own code to do that, and when you think that multiple monitors can be scaled multiple ways, I reckon this would be impossible (as MS handles it in it’s own CRT) – so my only option is to scale the screen location math, not the mouse position math, for the monitor check – but now I have run out of time and need to get back to work.
I’m still willing to look into it, but only if there is more interest in that – assuming you haven’t found a working solution elsewhere – either way let me know 🙂
OK, so I lied, I didn’t quite give up.
My research indicated that the latest Delphi (which costs like thousands and thousands) says it natively handles all these issues – so I had a friend who has it compile it for me, and yay it worked – for me at least!
So there’s no installer for it or anything, just get as is, save wherever you like, and create a start up shortcut for it. Get from: –
And wow, this new compiler…. the app size went from 400KB to over 2MB – but hey, it works!
You are a legend, my good sir.
After searching through posts from 2013 to 2019 in the world wide web, I touched every possible display setting imaginable, but the sticky corners on Windows 10 persisted (dual monitors, same resolution, perfectly aligned).
Sad that such a workaround is necessary. Joyful that people like you exist.
That said, thanks again for your efforts taken. Might have to show my appreciation via a donation and I urge everyone who found the solution here to do the same, if only for symbolic purposes.
I’m just happy you found a solution. It is a painful bug, and if you have monitors connected diagonally it is impossible!
hello my friend. thanks for creating the utility, however i have a hard time making it work. it just doesn’t work on my machine for some reason. whether i enable snap feature or disable it and then run your utility, the mouse still sticks to corners 🙁 i’m on win 10 LTSB version if that matters (probably lol). thanks again man.
G’day. By the sounds of it I would suspect the monitors aren’t perfectly aligned. They may look so on the Display Options but the interface for that is buggy. I suggest try following the directions here to check that: –
If you don’t get any joy from that please download and run the Debug version, and post a screenshot of it running and I should be able to work out what’s going wrong. The debug version is here: –
this might be too much… but i love you.
FYI to others.
After installing/using NSM reset your resolutions (switching to another and switch back. and make sure your screens are aligned… the debug tool is fairly useful and simple)
I found this utility to be a big buggy at times, especially in a mixed-DPI environment, so I wrote my own.
You can find it here:
Nice one 🙂
The latest NSM should be DPI friendly, at least, that’s what the latest Delphi compiler states – and it worked for me in limited testing (2 monitors) – but I could well imagine it may get confused with complex layouts. So far all reported issues have been resolved, but nothing like doing it yourself for a complete solution!
OMG. Thank you SOOOO much!