Visual Studio 2005 - code hiding feature in VB

JFK

Member
Joined
Nov 28, 2005
Messages
20
Location
Czech Republic
Programming Experience
5-10
Does anybody know, why is not available hiding code (Ctrl+M, Ctrl+H) in Visual Studio 2005 - Visual Basic even thought it was available in previous version (VS2003)?

It is even described in msdn manual: Not available in Visual Basic.


Thanks for any responce...

#JFK
 
In my 2005 Ctrl+M and Ctrl+H do nothing. I click the Plus signs next to functions to collapse them, or I right click and choose Outlining -> COllapse All

Or i define a region, and collapse it...
 
Yes, but in 2003 version it could be possible to hide any part of code you want. Using region is OK, but you cannot use it inside the sub, function etc.
I dont really understand, why should Microsoft remove this functionality. Is it forcing us to use another programming language?! (In C language code hiding is still possible in VS 2005)...

Thanks, #JFK
 
*shrugs*

Both my VB and C# show the + signs..

I must observe that every MS app i ever used, Ctrl+H was for REPLACE dialog..


Note in vb, i right clicked the document and chose "Stop Outlining" and the + signs went away. I right clicked and chose Outlining>> Start auto Outlining and they came back

Maybe its your prefs!
 
Does anybody know, why is not available hiding code (Ctrl+M, Ctrl+H) in Visual Studio 2005
It's because VB'ers has gotten so good at OOP and writing short methods that hiding only part of a method is no longer necessary, you only hide the full methods. ;)
 
to Cjard...

You must use Ctrl+M and Ctrl+H in (quick) sentence to hide some lines of code (in VS 2003). Any other outlining of subs, functions etc. works good for me. I'm missing possibility of hiding of code parts like for, until, if-then blocks and so on...

Best regards. #JFK
 
Oh.. its a Ctrl Chord!

I thought it was Ctrl+R for the start of a chord.. Maybe its my/your prefs again!

Did you succeed with point-n-click collapsing?
 
Hmm.. i dunno where i got Ctrl+R now, All my shortcuts on my new laptop are CtrlM chord.. anyways, CtrlM CtrlO collapses to definitions and CtrlM CtrlM toggles the block youre in (region/sub/whatever)..

VB2005 too, says for me "CtrlM CtrlH maps to &Hide Selection, which is not available right now"
 
http://msdn2.microsoft.com/en-us/library/td6a5x4s(VS.80).aspx

"Only available in C# and J# when Stop Outlining is chosen. Not available in VB"

If you miss it that much, you could use the default outlinings (blocks) or upgrade to C#? :D:D

ps; johns point is very valid: IF you are wanting this because you like to hide multiple sections of your 500+ long methods, you should get into a better habit of breaking your code up into smaller blocks, and hide those!
 
Back
Top