winzip icon

A VB6 Source Code Browser

Submitted on: 4/25/2018 11:33:07 AM
By: Dave Carter 
Level: Advanced
User Rating: By 6 Users
Compatibility: VB 6.0
Views: 2139
     (Help File Update) A Program to READ VB6 Source Code from a VB6 Project. Select a VBP to start. It is a stand-alone executable not an Add-In. I use it as a companion tool to developing large VB6 projects because it is informative in a way that the VB6 IDE isn't (without writing an Add-In).

The idea behind the main screen is that it has 3 view modes that are selected via the option buttons, bottom left from left to right:
1. Source Code View for reading source code.
2. Code Member Use is for finding where a code member is used.
3. Code Member List is for listing all code members in a project.

There several functions:
Source Code Review reports unused variables, parameters and private methods (e.g. functions, subs and properties).
Zip Viewer reads zipped VB6 Projects (perhaps from Planet Source Code) and can unzip them (Unzip32.dll required). It can also perform Search, Scan and source code review on the zipped project. Only unzips VBPs (not a general unzip facility).
Copy Project will copy just the development files and any others you specify to a new folder (helpful for de-cluttering a polished project). If you have Zip32.dll it can also zip the newly copied project. Also, checks for a '.manifest' and copies this as well if found.
Copy Code Member (e.g. Subs, Functions, Properties, Types, Enums, Constants, API Declares...) can drill down into its target code to discover any and all other code members that are used then sort and list them referentially for quick copying into a new project.
Line Use reports at Code Member, Module and Project levels show a breakdown of the code lines into those that are empty, commented, declarative and those that start with a control statement.

There is more but too much to mention here, please use the Help File, press F1; the Help File describes most of the forms, why they are there and how to use them.

Sorry, but Unicode and ASM strings do not work; lost in conversion from plain text to Rich Text (affects text in quotes and comments).
Code Members need to be formally declared for things to function as best they can (e.g. use Option Explicit and Dim variables).
As mentioned, Unzip32.dll and Zip32.dll are required to get the full functionality available, the Help File has some possible links to get them but they need to be properly installed from Win8 onwards.
Release version developed on Win7 which may or may not affect the Project's References, check the VBP for their paths and correct them as needed.

Acknoweldgements to Rde for Unzip to Memory, thanks Rohan :)

This was not an easy project but it was incredibly interesting and a lot of fun; Essentially, it's an experiment for me to study Code Parsing so there's a research bent to it all. There are some quirks but please remember this was hand written and tested by one bod on his own to suit his own needs at the time.

Update, 25 April 2018: included HTML and PDF versions of the Help file for those who do not have Winhelp.exe already installed in answer to issue raised by Greyling007 @ PSC (see comments below) with thanks. Best to use HTML version which first needs unzipping, load the file VBCBExp.HTML.

Please report any difficulties with the program's functions, thank you.

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

Other 2 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 Advanced 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

4/24/2018 3:00:43 PMGreyling007

ThE help menu nor the F1 is working right.
I was not able to view the help file at all.
Project looks great though.
Good job!
(If this comment was disrespectful, please report it.)

4/25/2018 11:53:45 AMDave Carter

@ Greyling007
Thanks for raising this Help File issue and the kind words.
Please check out the new update (25 April 2018) for the HTML and PDF versions of the Help File as promised.
If possible find and install Winhelp.exe so that you can get Context Sensitive Help, this is what .CHM files need to load, at some point Microsoft stopped distributing it with their Operating Systems. It may be made available via installing the HTMLHelp program that comes on the Visual Studio 6 CD.

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

4/26/2018 12:34:29 AMGreyling007

Yes, the help now works.(I had to unblock it in propertys seperately- using Win7)
WOW!, you really did a good job with this. The help is clear and easy to understand and the program, I am sure, will be very useful. Very good job Sir!

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

4/26/2018 9:47:27 AMDave Carter

@ Greyling007
Good to hear, thanks for letting me know :)
(If this comment was disrespectful, please report it.)

4/26/2018 3:26:38 PMRde

Hi Dave
This has developed into a very useful tool
I like the ability to copy code with all related code
Very clear and understandable, first class code
I have voted you 5 big stars for,
Happy coding :)

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

4/27/2018 1:16:01 PMdave Carter

Hi Rohan
Thank you,
very much appreciate your review and vote.
Happy coding too :)
(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.