Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Turn Off Visual Studio/VB.Net Lines around each method

In Visual Studio when working in VB.Net, it automatically creates lines/regions around methods etc.

How can this be turned off somewhere in the options?

like image 207
Jon Avatar asked Feb 14 '11 15:02

Jon


People also ask

How do I enable outlining in Visual Studio?

Tools -> Options -> Text Editor -> C# -> Advanced -> Outlining. Show activity on this post. Show activity on this post. For VS2008, it's under Tools – Options – Text Editor – C/C++ - Formatting - Enter outlining mode when files open.

How do I get lines of code in Visual Studio?

Change the search option to either "Current Project" or "Entire Solution" depending on your needs. Now select "Find All". At the bottom of the Find Results window, you will see "Matching Lines" which is the lines of code count.


5 Answers

If you open Tools ==> Options, and select Text Editor, there is a "Basic" section for Visual Basic. This option is on the "VB Specific" sub-section. Unselect "Show procedure line separators".

like image 58
shannon.stewart Avatar answered Oct 02 '22 16:10

shannon.stewart


This is known as "Outlining Mode" and can be disabled by doing the following

  • Tools -> Options -> Text Editor
  • Navigate to the Basic -> VB Specific sub category
  • Uncheck "Enable outlining mode"
like image 31
JaredPar Avatar answered Oct 02 '22 15:10

JaredPar


Using Visual Studio 2017 and above

For C# and Basic

  • Open Tools > Options or press Alt + T + O
  • At the top of the list search for "Show procedure line separators"
  • select Advanced
  • In group box Outlining
  • Uncheck "Show procedure line separators"

enter image description here

like image 31
Anas Alweish Avatar answered Oct 02 '22 15:10

Anas Alweish


For anyone that comes across this and is using Visual Studio 2012. Those lines are off by default. If you want the lines back then you need to:

  • Tools -> Options -> Text Editor
  • Navigate to the Basic -> VB Specific sub category
  • Uncheck "Enable outlining mode"

Yes, these are the same steps that JaredPar explained to turn the lines off. However, it's completely backwards in 2012 and unchecking this option will bring the lines back.

Way to go Microsoft!

like image 21
Justin Emlay Avatar answered Oct 02 '22 15:10

Justin Emlay


The menu sequence is a bit different for VS2015.

  • Tools -> Options -> Text Editor -> Basic -> Advanced

  • Uncheck "Show procedure line separators."

like image 32
B Pete Avatar answered Oct 02 '22 14:10

B Pete