This is an Add-In I made that will show as a Toolbar in the VB IDE:
The first button (and most usefull) will auto indent the currently opened code window.
For example, you could have code like this:
After you click the auto indent button, it will be like this:
The second button displays the procedure list:
I use the procure list to have a "preview" on what is in the selected code window. When you double click on a line, it will jump to that window, and also to the line number where the procedure starts.
If you press "Ctrl+F", it will add the selected procedure to the "Favourites", you can add to favourites from any code window, and when you double click it will move the cursor to that procedure.
I wanted to add more features, like adding line numbers, error control (but with more features/options than MZ-Tools), and also to remove uneccessary blank lines or add blank lines when there are none, but I never had the time to do it yet, so I thought to just post what I have until now, and I will update the post when I have a new version.
Please post (tell me) when something is wrong, especially with the auto indenting code (if it does not indent properly).
To get it to work, first compile the code, then add the add-in in the IDE from the "Add-In Manager"
Last edited by CVMichael; Jul 18th, 2007 at 08:35 AM.
I actually wanted to do something like that, but I ran into problems when I could not get the hWnd handle of the Code Window (for subclassing)
I have one more neat idea to add if I would be able to subclass the window. To integrate API into the IDE, for exaple, if i type in the code window "Private Declare " and as soon as I press the space bar, to show like the intellisense a list of all the APIs and while I type to search for a match that begins with what I typed... just like the intellisense... and also to have the option to automatically insert Types and constants for that particular API that I'm adding...
Last edited by CVMichael; Jul 27th, 2007 at 11:10 AM.
Thank you for this tool, but unfortunately found an immediate bug.
I need to create a very long absolute string for a tab-delimited file header. I may as well hard-code it as it will not change. This was done over a number of lines looking like the following:
Your program concatenated most of the lines into a single unreadable line, but left some of it on the next line, in red (meaning that it was formatted illegally).
I haven't had time yet to look at the code to mend it, but it is certainly a problem as I have several such instances and the whole point of placing things on multiple lines was to make it more readable.
Thank you ... a very useful tool ... I've got over 40,000 lines of code that are mostly indented properly but just needs tidying up in places.
Chris.
I'm new here and my original post seems to have disappeared ... so here is something similar:
The add-in is excellent but multiple lines with continuation underscores are joined together on a single ... which leaves SOME of them left over, creating illegal code.
The reason I need this is because I'm hard coding a tab-delimited file header (it will not change, honestly!). Here it is:
This looks like a useful forum .... one that I've only just discovered, so I shall hang around and hopefully learn ... and possibly even contribute, although there are many better brains around than mine!
I was planning to fix the "bug", but I always forgot about it, and I rarely have time latelly to look over the code to fix the problem.
I don't understand why would it remove the "_" in only some cases... maybe if you post the code before and after change by my Add-In... maybe I can figure out why this happens...
Not so much a bug, as you say. I think the reason is the fact of the size and number of continuations.
I also like to use continuations for complex CHOOSE statements and where I use long literals in MSGBOX statements. Yes, I KNOW I should be using RES files, etc., but it is often more convenient to use literals!
Whoops ... sorry ... must have pressed the send button twice. Probably my Alzheimers kicking in .... unfortunately I don't seem to be able to delete it!
I am creating a simple add-in for Access 2010 using VBA. I want to provide it to clients unencumbered. Some code I use comes from V-Tools, http://www.skrol29.com/us/vtools.php#support and skrol29 has agreed to license it under lgpl3.
I have used some code from mdlIndent.bas and would like to know if it can also be used under this license.
I don't know much about licenses (and I don't have time to read about this license right now), but if your asking for permission to use my code in your add-in, then "yes", you can use it. Just put a comment with a link to this thread in front of the code that you copied. That is enough for me...
I used your code from mdlIndent.bas with several changes for writing simple add-in, which the written on Delphi language, for 32- and 64-bites host applications.
I planing distribute compiled dll for free, include source code under MIT license.
Can I share this code with mark about originals algorithm author and link to this tread?
I used your code from mdlIndent.bas with several changes for writing simple add-in, which the written on Delphi language, for 32- and 64-bites host applications.
I planing distribute compiled dll for free, include source code under MIT license.
Can I share this code with mark about originals algorithm author and link to this tread?