|
-
Sep 22nd, 2005, 02:44 PM
#1
Thread Starter
Hyperactive Member
Sort,Order,Alphabetize routines in IDE code
When creating new subs and functions in the IDE, is there any way to help keep them in alphabetical order?
In VB6, creating a new method at least tried to insert it in proper order, here in .NET it seems to just insert it at the end of the existing code.
Thanks, DaveBo
"The wise man doesn't know all the answers, but he knows where to find them."
VBForums is one place, but for the really important stuff ... here's a clue 1Tim3:15
-
Sep 22nd, 2005, 02:48 PM
#2
Re: Sort,Order,Alphabetize routines in IDE code
Yes, that is soo irritating. No matter where you place the cursor, it will always add the procedure to the end of the file. 
Perhaps you could make an IDE Add-In that would alphabetize them or insert the procedure where the cursor is? I know i would like that.
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
Sep 22nd, 2005, 03:37 PM
#3
Re: Sort,Order,Alphabetize routines in IDE code
If any specific module (which is usually all of them) goes anything beyond a few screens of scrolling, I always make code regions and group my code according to what it does... for example i may put all routines that handle form/control events all in 1 region, while any little functions/subs will go in another... depending on the code itself, I group things differently.. makes it pretty easy to keep things organized.
-
Sep 22nd, 2005, 06:28 PM
#4
Re: Sort,Order,Alphabetize routines in IDE code
I agree, and I group even when there is less than a screen if it makes sense.
However, if you have a form with ten buttons, and you decide to group them into a region, that is fine. But then, if you add an eleventh button, the handler will go at the bottom of block of code, nowhere near the other buttons, and it then has to be copied and pasted into the region. It sure would be nice if you could specify where to put the handler, perhaps by cursor location.
My usual boring signature: Nothing
 
-
Sep 22nd, 2005, 06:28 PM
#5
Re: Sort,Order,Alphabetize routines in IDE code
To say that alphabetically is the "proper" order is highly subjective. I'd never even consider keeping members alphabetically ordered. It's also not really practical to create a new event handler at the cursor position because what if the cursor is in the middle of another method. The VS.NET IDE provides the facilities to create macros to do all sorts of things, but standard functionality like that would annoy far more people than it would please I think.
-
Sep 22nd, 2005, 06:32 PM
#6
Re: Sort,Order,Alphabetize routines in IDE code
I agree as far as alphabetical ordering, but I do think there is a rational way to insert a handler near the cursor. You are right that putting it AT the cursor would be a mess, but I think that putting it at the next spot below the cursor (not in a sub or function block) would work for most people, and would save some of us a measure of aggravation.
Kind of minor, though.
My usual boring signature: Nothing
 
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|