169

Visual Studio 2010 adds a zoom setting on the bottom left of the text editor (to the left of the horizontal scroll bar) and also adopts the Ctrl+mouse scroll idiom for zooming in and out.

The former is fine, but I dislike the latter as I am occasionally still holding control when I start scrolling my source code (which results in the text size radically changing and completely throwing me off whatever I was doing).

How do I disable it?

shA.t
  • 16,580
  • 5
  • 54
  • 111
Redwood
  • 66,744
  • 41
  • 126
  • 187
  • 25
    +1. This control + mouse scroll feature is horrible. What were they thinking? – Souper Oct 18 '12 at 02:14
  • 1
    @Souper I doubt they do think at all when making GUI for their software – Georgii Oleinikov Jan 25 '13 at 19:39
  • 3
    @GeorgiiOleinikov, that's very deep. – Kirk Woll Feb 08 '13 at 22:06
  • 4
    If this isn't the stupidest feature in Visual Studio I don't know what is. – Rosdi Kasim Mar 31 '13 at 18:02
  • 2
    It's a "[great new feature](http://blogs.msdn.com/b/zainnab/archive/2010/01/07/zoom-in-or-out-of-text-in-the-editor-using-the-mouse-wheel.aspx)", apparently. :) – Mark Whitaker Jul 22 '14 at 12:32
  • 2
    @RosdiKasim That's an incredibly bold statement considering many people love the zoom feature - myself included. If you can't come up with a reason to use it, that's fine, but I use it every single day many, many times and I know I'm gaining efficiency as a result. I use this feature in many other programs as well with quantifiable benefits and zero downsides. As Mark said, but non-sarcastically, it is a great feature even though it isn't actually new. – Anthony Sep 19 '14 at 19:53
  • 4
    It's good to see i'm not the only one who hates this feature – tenderloin Oct 30 '14 at 04:56
  • the control+mouse scroll is used everywhere, not only MSVC and it's great. a lot of my colleagues also use that – phuclv Apr 18 '15 at 07:05

5 Answers5

230

Go to Tools->Extension manager, and search the online gallery for "wheel". Download "Disable Mouse Wheel Zoom"

enter image description here

Or use this direct link: Disable Mouse Wheel Zoom.

anatolyg
  • 26,506
  • 9
  • 60
  • 134
drharris
  • 11,194
  • 5
  • 43
  • 56
  • 3
    Selected this as the answer because it was the method I ended up using to install the extension. – Redwood May 18 '10 at 22:57
  • 29
    If it ever isn't the first link, the name is "Disable Mouse Wheel Zoom", and [here is a direct link](http://visualstudiogallery.msdn.microsoft.com/en-us/d088791c-150a-4834-8f28-462696a82bb8). – Noah Richards May 18 '10 at 23:49
  • 1
    Wonderfully useful extension. I kept accidentally zooming in to my source code and it was getting very annoying! – Matthew Sharpe May 24 '10 at 09:00
  • 1
    Bless this extension! I thought I was going to have to ditch my Kensington trackball with the integrated scroll wheel from all the accidental zooming... – Kelly Adams May 17 '11 at 16:37
  • This extension has not yet been updated for Visual Studio 2012 RC, but there are instructions in the Q&A section of its page in the gallery that explain how to enable installation in VS 2012 RC and it seems to function correctly once installed. – Redwood Jul 23 '12 at 22:02
  • Confirmed available and working in VS 2013 as well. Yay! – Jason Jan 16 '14 at 20:04
  • 9
    Most popular Visual Studio extension ever. I echo the sentiment of "what were they thinking"?! This isn't a video game, it's an IDE for productive software development and Ctrl + V + subsequent scroll while still holding down Ctrl has VERY relevant use (i.e. pasting code several places in the same document). Hats off to the developer of this extension. Microsoft needs to relegate zooming to a submenu where it belongs, not primary keystrokes used by every efficient developer on the planet. – CubicleSoft Feb 22 '14 at 17:06
  • This extension should come installed by default in future versions of VS ! – Gilles Aug 31 '15 at 13:32
  • This zoom thing is very annoying with laptops. – Vahid Amiri Dec 06 '15 at 12:03
  • Upvoted because this works and is simple. I also tried the AutoHotKeys suggested by Herb Caudill which I like even more. – Colin Feb 20 '17 at 22:05
46

It is possible that Visual Studio 2010 will get into a state where ordinary use of the mouse wheel (ie without Ctrl pressed) results in text increasing or decreasing in size.

Use ctrl + scroll on the page to recover from this state.

L Y E S - C H I O U K H
  • 4,765
  • 8
  • 40
  • 57
subbu
  • 477
  • 4
  • 2
  • 2
    This answer is quite handy if you ever get stuck in this state (which has happened to me a couple of times - could this be a bug in VS2010?). Hence upvote. – dominic Mar 02 '12 at 06:25
  • 8
    Doesn't answer the OP question, certainly. But this page came up first on my google search, and this answered _my_ question. – RalphChapin May 18 '12 at 16:36
  • I reposted this as a separate question and answer in hopes of making it easier to find for people looking for the answer to that question (as opposed to the one I was looking for in this question): http://stackoverflow.com/questions/11621290/how-do-i-fix-visual-studio-2010-zooming-on-scroll-even-after-i-release-the-contr – Redwood Jul 23 '12 at 22:44
  • +1 for great tip. And how to I reset to the default zoom level? (me stuck with larger than normal font) – Souper Oct 18 '12 at 02:16
  • This is what I was looking for but not the answer to the question. Upvote though becuase it answered my question. – Omar Kooheji Oct 31 '12 at 11:55
  • 1
    For me this only worked with right control button. Left control didn't reset the behavior. – Jerome Jul 22 '13 at 18:48
10

I don't believe there is a way to do this the editor through the exposed options. However Noah Richards, a visual studio platform developer, wrote a Visual Studio extension that disables the mouse scroll zooming.

JaredPar
  • 733,204
  • 149
  • 1,241
  • 1,454
9

This is a problem throughout Windows, not just in Visual Studio. To disable Ctrl-Scroll zooming behavior throughout Windows, you can use AutoHotKey as described in this answer:

^WheelDown::return
^WheelUp::return

This just reprograms AutoHotKey to do nothing on Ctrl-Scroll.

Community
  • 1
  • 1
Herb Caudill
  • 50,043
  • 39
  • 124
  • 173
  • I also added #MaxHotkeysPerInterval 16384 – Colin Feb 20 '17 at 22:06
  • @Anthony problem: "a matter or situation regarded as unwelcome or harmful and needing to be dealt with and overcome." Seems to me the definition of a problem fits. You love this "feature", fine. Others don't. Here it is 2019 and I don't know how to turn this annoying "feature" off in VS. So it is still a problem for me. At last all of the hours I have invested/wasted in AutoHotkey are useful. 2 minute fix. - Thanks for that. – Andrew Dennison Jun 24 '19 at 20:05
  • @AndrewDennison Cool, you used a dictionary definition to completely ignore the intended usage of the word. Great argument and point. Really, bravo to you for finding the world's most specious argument. – Anthony Jun 25 '19 at 03:58
0

This is a Windows limitation, that even on Visual Studio 2022 can't be "solved". But the limitation can be circumvented using AHK. Just write this script, compile it, run it and voila:

#IfWinActive ahk_exe devenv.exe
^WheelDown::return
^WheelUp::return
#IfWinActive
KeyC0de
  • 4,728
  • 8
  • 44
  • 68