Important alert: (current site time 5/25/2013 9:26:42 AM EDT)
 

winzip icon

VBP Code Member Explorer for VB6 R5

Email
Submitted on: 5/7/2013 1:44:16 AM
By: Dave Carter 
Level: Intermediate
User Rating: By 12 Users
Compatibility: VB 6.0
Views: 7780
(About the author)
 
     Bit of a VB Code Browser (using RTF not HTML) that can be helpful when checking for unused Members (Variables, Parameters, Subs, Functions, Constants, APIs etc) at Method, Module and Project Level, in a large VB5 / VB6 Project. A single list of Members makes it easy to find duplicate declarations and find all declarations by type. The program can be helpful for grabbing Code Snippets and copying Source Code Headers and Files (including any associated Binaries). Implemented Interfaces and Object, Menu and Control Events are grouped together in the Class Explorer along with any Parameters or Variables they may have. Private Members can be hidden from the Class Explorer to reveal a Module’s Visible Interface and then, with Auto-Find-Use, you can see where its Public Members are being used.

Now the rub, program is incidental to on-going VB Code Parsing Study ‘twbb’ (there will be bugs), try reselecting stuff and clicking it again. Expect Unicode to come out as ??? etc and, obviously, I wrote this while juggling a triage of rampant, spikey arsed, moon goose on the blisteringly hot, purpled crab, sands of Belle-Fartious-Minor, in flip-flops, being charged by a billigerent pack of MS VB6 Programmer’s Guide books demanding I explain why they remain unconsulted!

Please feel free to comment, make suggestion and/or report bugs, as you like.
BTW: no warrantees or guarantees, given or implied.

Expect delays loading Rich Text, when code lines exceed a few thousand. Once again, this program (on a good day) is (meant to be) a bit of a VB Code Browser for VB5 / VB6 that gives Visual, Member Level Access to Working VB6 Source Code in a simple and easy to use GUI (he says). It can be helpful for finding and copying Code Snippets, checking for unused variables and methods and finding duplicate declarations in Working VB5 / VB6 Projects. Expect glitches, everything is exploratory or experimental or both.


R5
Source Code Review, Project Scan, Copy Multiple Members, Mini Code Generator (Type Code Helper), Dependencies between source code files, export code to HTML & RTF, export Interface Members to XML… and even more stuff.


Hoping we can make our own Planet Source Code, VB6 Code Browser, this program is just trying to discover some of things that might be involved in such an endeavour. Please contact if interested, advise, suggest, update, fix, speed it up, laugh at it and post your own… 208K zip
Love, Peace, Bananas and Happy Coding :)
Dave

 
winzip iconDownload code

Note: Due to the size or complexity of this submission, the author has submitted it as a .zip file to shorten your download time. Afterdownloading it, you will need a program like Winzip to decompress it.Virus note:All files are scanned once-a-day by Planet Source Code for viruses, but new viruses come out every day, so no prevention program can catch 100% of them. For your own safety, please:
  1. Re-scan downloaded files using your personal virus checker before using it.
  2. NEVER, EVER run compiled files (.exe's, .ocx's, .dll's etc.)--only run source code.
  3. Scan the source code with Minnow's Project Scanner

If you don't have a virus scanner, you can get one at many places on the net including:McAfee.com

 
Terms of Agreement:   
By using this code, you agree to the following terms...   
  1. You may use this code in your own programs (and may compile it into a program and distribute it in compiled format for languages that allow it) freely and with no charge.
  2. You MAY NOT redistribute this code (for example to a web site) without written permission from the original author. Failure to do so is a violation of copyright laws.   
  3. You may link to this code from another website, but ONLY if it is not wrapped in a frame. 
  4. You will abide by any additional copyright restrictions which the author may have placed in the code or code's description.


Other 4 submission(s) by this author

 


Report Bad Submission
Use this form to tell us if this entry should be deleted (i.e contains no code, is a virus, etc.).
This submission should be removed because:

Your Vote

What do you think of this code (in the Intermediate category)?
(The code with your highest vote will win this month's coding contest!)
Excellent  Good  Average  Below Average  Poor (See voting log ...)
 

Other User Comments

7/28/2012 5:36:07 AMDave Carter

line count not reporting correctly, sorry, fix in the pipe
(If this comment was disrespectful, please report it.)

 
8/17/2012 10:51:07 PMfancytom

How to find out Sub(Function) name which is never be called ???
How to find out Sub(Function) name which is never be called ???


When a project is done. We have to dele the Sub(Function) which is never be called.

(If this comment was disrespectful, please report it.)

 
8/25/2012 7:46:17 AMDave Carter

hi fancytom, as picture above, middle option button, select a member from the class explorer, get a list of where it's used, change filter properties to find unused items. see auto-find-use from help menu.
changed description wording above, never meant to imply automated review, my use of the words hands-on was clearly understated, I test one thing at a time.
(If this comment was disrespectful, please report it.)

 
8/28/2012 8:05:45 AMAlladdin

dear Dave, nice code, I did try to load heavy vbp projects and was quick and seemed to work correctly.
I also had the following question: Would it be possible to adapt the code to also load only a bas file (for tools using integrated VBA editor, the main file is always a bas and not a vbp file). I had quick look at it, but it seemed not so easy to adapt: the code to do this. Anyway, great work
(If this comment was disrespectful, please report it.)

 
8/28/2012 9:36:19 AMnamal

nice work
(If this comment was disrespectful, please report it.)

 
10/2/2012 11:48:21 PMBonnie West

Keep up the good work!
(If this comment was disrespectful, please report it.)

 
10/5/2012 2:16:45 PMDave Carter

Hi Alladdin, Namal & Bonnie
Thanks, it's been a shed load of work to get this far but also a lot of fun.

Alladdin, one plan was to have programmatic access to source code, via a CodeReader instance e.g. xCodeReader.ReadCodeFIle("C:\Any.bas")
Use the modPBTypes.LoadMemberTV to load it into a Treeview
[the Treeview needs to set its ImageList to frmExplorer.imglM, you need a CodeReader, Trreview & ComboBox]
See the CodeReader help for getting going and contact me if still not sure.
Thanks

(If this comment was disrespectful, please report it.)

 
10/5/2012 2:49:36 PMDave Carter

Hi fancytom
Let me know if you get on with the source code review and where it goes wrong (so I can fix).
Unchecked, the tests are on private members like MZ-Tools Review Source Code, Checked adds project wide tests on Types and Enums and Public Methods in Modules (.bas).
Try outputting the results to XML for flexible reporting (see frmRevSrcCode.pFilterResults for access to the results array [ mtUnused() ] data).
Thanks

(If this comment was disrespectful, please report it.)

 
10/19/2012 10:36:33 AMranman5

This project is very helpful to discover code you may miss. I found code that I was curious about and with the enlarged feature helps you to see better. Giving this project 5 for being very helpful.
(If this comment was disrespectful, please report it.)

 
10/26/2012 3:04:19 PMDave Carter

@ ranman5
Glad you can find the program useful and thank you for saying so.
dave :)

(If this comment was disrespectful, please report it.)

 
11/2/2012 4:57:11 AMThierry

very helpful for me and so smart, I learn a lot reading your code ... thanks
(If this comment was disrespectful, please report it.)

 
11/10/2012 3:37:05 AMDave Carter

@ Thierry
My thanks in return for your generous comment, very pleased there is something helpful to you.
Happy Coding
dave :)
(If this comment was disrespectful, please report it.)

 

Add Your Feedback
Your feedback will be posted below and an email sent to the author. Please remember that the author was kind enough to share this with you, so any criticisms must be stated politely, or they will be deleted. (For feedback not related to this particular code, please click here instead.)
 

To post feedback, first please login.