Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

sorry about the vague title as I didn't know exactly what to call it or if what I am asking for even exists.

Basically what I want is a program that can lock the mouse to the boundaries to the active programs window when a hotkey is pressed. for example, lets say I am using notepad and click Ctrl + F12 (for example), my mouse would be locked to the dimensions of notepad and would only be allowed to move freely within the application. pressing the hotkey again would release control of the mouse. are their any programs that can accomplish this? or would I have to try and write one myself


For those who may be apprehensive about trying Renes program, I took the liberty of running it through an online multiple av checker

share|improve this question
up vote 1 down vote accepted

I have searched and found no such program, so I went ahead and made my own. I have absolutely nothing to do right now. Here's a link to what I've made. If you do not trust it, please tell me, I will send you some more screenshots, and whatever :)

It currently works by just hovering your mouse over any program, and then pressing ctrl + F12. The text on the program then will say "StickToIt is currently on.", and you will not be able to move your mouse out of the program you where hovering over when you activated it. You disable it again by pressing ctrl + F12.

You can move the program by simply dragging it with your left mouse button, and you can close it by either A: clocking it in the taskbar, or B: right clicking it. Please note that it takes about 2 seconds to close after right clicking.
Also note that you need .Net Framework 4.0 to run this. I am sure you can find it with Google :)

If you'd like any more customization (like other buttons, or different looks), please contact me in whatever way you wish. (I suggest commenting on this answer.)


share|improve this answer
Thanks for making that :) although it is alittle buggy, it works :) would there be any way I could get the source for the program? – Ozzy Apr 3 '11 at 3:21
Definately! It's in Visual Basic.Net though. Here's the link ;) It's a Visual Studio 2010 project file. Let me know if you don't have that. I'll just upload a notepad file :P – René Apr 3 '11 at 3:35
Btw, about it being buggy: To make it not be buggy, I'd have to make a mouse hook, after years of programming, I still don't have a perfect hook. They take much CPU and RAM, and aren't reliable at all! This is about the best you can do without spending a day's work :P – René Apr 3 '11 at 3:43
Can you compile it for Vis Studio 2008? mine cannt open 2011 :( couldnt you just listen to mouse move messages calculate the bounds that way? – Ozzy Apr 3 '11 at 4:26
This should work. Well, that's the thing, listening to the mouse move messages IS a mouse hook. Very unreliable. Didn't feel like doing all that either :P – René Apr 3 '11 at 5:23

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.