Text editor in procedure view

humate

Newcomer
Joined
Jul 21, 2003
Messages
5
Is there any way to set the text editor in the .net IDE to show modules in procedure view, as could be toggled in VB6? I got used to this way of working and really don't want to see an entire module at once.
 
I'm almost certain that you can't do this in .NET, and with good reason; blocks of code are not simply procedures like the VB6. .NET is full OOP programming, so you can not only have procedure definitions in classes (you should never use modules, since it defeats the purpose of .NET and OOP) you can have other classes, attributes on procedures, variable definitions scattered throughout the file, etc. Not only that, but it'd be must less productive.

You can use the #Region and #End Region directives to make portions of your code collapsable with a small title or description. This is great for keeping pieces of code separate without actually removing it from the code window.
 
I agree with what you say and appreciate that terms like 'procedure' and 'module' are mostly VB6 leftovers, but at the same time Microsoft seem to be keen to keep VB6 users reasonably happy in the 2003 edition. There are options to add separator bars between procedures and to collapse them so it would seem a small step to me to separate them out further, if that's what the user wants.

Given the case where you have a large, complex but well working VB6 product (which you may or may not have managed to convert to .net), I've always found the procedure view option actually more productive as it aids focus, regardless of what type of object is being edited. You see one or two screens of a conceptual block (and can instantly get to the beginning and end) rather than a hundred screens of unrelated code. And moving around is generally done via definition jumps or searches rather than explicitly choosing an object to edit.

Thanks anyway.
 
True, but all the code in classes is not just focused in subs anymore; you can have attributes, sub-classes, etc... you also need to have easy access to edit the rest of the file, since you can have more than one class inside one file. It might be productive in a VB6 environment, but in a .NET production environment the practice just doesn't carry over well.
 
Back
Top