This is really annoying, can anyone offer help?


  • I am using VS community 2015. I am not sure what it is called, but it's the "chuck" of code, such as a subroutine, button event, function etc when there is that little box to the left of it. Click on it and that "chuck" closes. Click again and it opens. Whenever I finish with a "chuck", I close it so I am not scrolling all day long. My problem is that from time to time, they all open on their own. I have to waste time clicking all of them closed again. 1) Is there a shortcut to close all of them and 2) is there a way to stop them from opening themselves in the first place. Also, please let me know what those little boxes are called. I have been dealing with this for some time now and have no idea how to stop it.

    Thanks in advance.

    Saturday, April 28, 2018 11:39 AM

All replies

  • Could you insert a screenshot of the "chuck" or share it via cloud storage such as OneDrive, Dropbox, etc?

    Ashidacchi --

    Sunday, April 29, 2018 2:27 AM
  • Do you mean 'outlining'?

    There are some commands in Edit->Outlining:
    Also you may find settings in 'Tools->Options->Text->Editor'
    E.g for c#:

    (Pictures VS 2017, VS 2015 may differ)

    With kind regards

    Sunday, April 29, 2018 10:01 AM
  • # Thank you for your suggestion, MaybeCompletelyW,

    Hi KKmac2013,
      We are waiting for your reply.
      What is "chuck"?  It is "Expand" or "Collapse" in TreeView?


    Ashidacchi --

    Sunday, April 29, 2018 10:21 AM
  • I didn't know what it was called, but the first image posted by "MaybeCompletelyW" is exactly it. The little box with the + and - in it. Apparently its called outlining. If I click that box and it closes or "Collapses", what gets hidden is the "Chunk" I am talking about. When I am done working with said chunk, block, etc., I collapse it. But every now and then, all collapsed codes open and makes finding where I am working much harder.

    Why do collapsed codes open themselves from time to time? Is there a shortcut to collapse all? Can I stop them from opening themselves? To be clear, I am using Visual Basic, not C or C#.

    Sorry for the delay in responding, I had a very busy day yesterday and did not expect such quick replies. Thank you. I will poke around in the outlining options to see what works.

    Thanks again.

    Sunday, April 29, 2018 11:48 AM
  • If all regions are open, would try either VS-menu or keyboard shortcut e.g.
    'Toggle All Outlining' (see the above link).

    IIRC the state (per file, full paths) is saved in the *.suo file - which may lead to the loss of this info e.g. if you move respective file.
    But I am afraid, I do not know, why restoring (on re-opening) may fail sometimes 'out of the blue', which I assume, is happening to you.

    Have a nice day
    Sunday, April 29, 2018 1:25 PM
  • 1 thing I have experienced is when dealing with strings in quotes. Example: "C:\Directory\". If I started typing that line character for character, as soon as I type the first quote, everything after it turns red (because its looking for the ending quote) and expands all collapsed codes after it. My work around it to type both quotes really fast. Visual Basic doesn't seem to have enough time to expand all codes. I then need to back up and type what I need in the quotes. If I delete a line with quotes, but miss one of the quotes, it happens again. Very annoying.

    Often times my projects have multiple forms. When I am done working with a form I often close it. Not always, but many times when I re-open the closed form, all codes are expanded, even when they are collapsed when I closed the form.

    I will research more about what each outlining option does before I make any changes. I don't want to screw anything up.

    Thanks again.

    Sunday, April 29, 2018 4:32 PM