CodeBox for .NET is a full-featured utility that lets you store Visual Basic .NET and C# code into Access, MSDE or SQL Server 7/2000 databases. You can store individual methods, classes, modules, structures, interfaces, or partial code snippets. You can browse the code with a treeview-based explorer, search, bookmark, print and export code items to HTML, organize them in categories by using drag-and-drop, and much more. Each code item can also be linked to a number of other items, for example dependent routines. And for each code item you can provide sample code that shows how the snippet can be used in your program, as well as additional notes or even long pieces of text in rich-text-format (RTF).
In addition to code, you can use CodeBox for .NET to store files of any type and size, and associate them to a single code item or to a category. This way you will have the opportunity to group all your sample files and zipped projects in one place to achieve a better organization of your material.
Other features include the possibility to merge multiple libraries (even if
in databases of different type), calculate statistics for any category or single
code item (total lines of code, command lines, empty lines, number of files
stored and their size, etc.), HTML export and printable reports based on multiple
templates, and more.
CodeBox for .NET comes with a code library that contains several ready-to-use
VB.NET and C# routines, but you will also able to download from the web the
last items added to the VB2TheMax's banks authored by its team members, via
a web service.
CodeBox for .NET is a stand-alone application, not exclusively tied to any particular IDE, and therefore can be used by developers who use Microsoft Visual Studio .NET, Notepad or any third party code editor. However, it also includes a small add-in for Microsoft Visual Studio .NET, that adds a new menu item and toolbar button to this IDE, to easily run CodeBox for .NET from inside it. If you use other code editors, just double click the shortcut added to the desktop, or under the Start | Programs menu.
In this help file:
Many common operations with CodeBox for .NET can be performed from its main window:

You can:
The following table lists the buttons in CodeBox .NET's main toolbar, with the corresponding menu item and description. Click on the icons to jump to a separate section (where present) with more information on that command.
By default, CodeBox for .NET automatically opens the code library you browsed the last time you used the program. If that archive isn't available possibly because it has been moved to another directory, renamed, or deleted a dialog appears so that you can connect to another archive or create a new one.

You can:
When a code library is already correctly loaded, you have the same options by clicking the first three button on CodeBox for .NET's toolbar.
CodeBox for .NET supports Access 2000 MDB format only, and does not support the Access 97 format. The database you connect to via ADO.NET can be Access, MSDE or SQL Server databases, and of course it must contain all the necessary tables, relationships and indexes. For creating a new Access code library just use the corresponding CodeBox for .NET's command, whereas you have a number of options for a MSDE / SQL Sever database, including:
The Merge Library command that you find on the toolbar and under the File menu allows you to import a second library into the currently open library. The second library can be an Access / MSDE / SQL Server database, and you select it by means of the standard OLEDB Connection wizard. All the routines and files of the library being imported will be moved under the same category structure. If a certain category does not exist, it will be created.
The merge is based on the item's unique ID (that is stored as a GUID in the database), so if you created a routine with the same name on two different libraries, they will have different IDs, and if you merge them you'll have two homonymous items in the destination library, but possibly in different locations and with different code.
At the end of the operation you will get a report of all the added routines and files, and you can save this log to a text file.

The Professional and Enterprise versions of CodeBox for .NET are shipped with a library already filled with a number of categories and code items. However, the VB2TheMax Team will update the master database as they add new .NET code and tips to the site, and you'll be able to download these updates from the web and merge them with the currently open library by clicking the Web Update toolbar button or the homonymous command under the File menu.
The command connects to a web service and downloads all the items newer than the most recent item in the current library, where the author name is "The VB2TheMax Team". This implies two things:
Once the new items have been downloaded, they will be merged with the current library, and you'll get a report dialog similar to the one shown in the Merging code libraries section.
Note: the first time you use this command you'll be asked to enter the registration code you obtained when you purchased CodeBox for .NET. Alternatively, before using this command you can register CodeBox for .NET by means of the Help | Enter Registration Code... command.
To quickly locate code you should organize your code procedures in categories and, if necessary, sub-categories. You can create a category by clicking on either the New Category toolbar button or the corresponding command under the Edit menu, or by right-clicking on the parent category and selecting the New Category... menu command. When adding a new code category you are prompted for a name and optional description and notes (in RTF format).

You can edit the data associated to the currently selected category by clicking on either the Edit Item toolbar button or the corresponding menu command in the treeview's contextual menu or under the Edit menu.
You can add a new code item by clicking on either the New Code Item toolbar button or the corresponding command under the Edit menu, or by right-clicking on the parent category and selecting the New Code Item... menu command.

You can edit the data associated to the currently selected code item by clicking on either the Edit Item toolbar button or the corresponding menu command in the treeview's contextual menu or under the Edit menu.
At the very minimum, a code item must have a name, a type (method, property, class, module, structure, interface, snippet), the author's name, and of course the code. It can also be assigned a description, RTF notes, examples, and dependencies on other code items in the same CodeBox for .NET archive. Note that you have separate tabs for storing the code in Visual Basic .NET and/or C#.
The Example tab is where you insert any usage example for the code item.
The Notes tab is where you add any additional information about the item,
such as version history or search keywords. CodeBox for .NET makes it possible
to search an item by this field only, which usually delivers better and more
focused results than searches on the code itself.
The Dependencies section lets you specify on which code items the current
code item depends on, or is related to. These dependencies can later be automatically
printed or exported to HTML together with the selected item.
You can add, remove and extract files of any type from the code library in order to organize your sample files and projects, maybe zipped projects downloaded from Internet that you open just from time to time. Moreover, you may want to associate an entire sample project to a routine because a few sample code lines wouldn't be clear enough. The files you add to the library are not linked to a physical file on the hard disk, but they are actually saved into the database, therefore you no longer need to create nested folders to organize these files.
You can add, edit or remove files from the New/Edit Category or New/Edit Code Item dialogs. Once you added your files in the Files tab, double-click on single files or click the Edit... button to change their description.

To see the files associated to the category or code item currently selected in the explorer tree, select the Files tab on the right pane. The listview with the files has a contextual menu with commands to edit or save to disk the selected files.
To view the statistics (total number of lines, comment lines, number of files etc.) of any item in the library, select the item in the explorer tree, select the Statistics tab in the right-most pane, and click the Calculate button.

You can quickly search any code item on several keys and attributes, by clicking on either the Search toolbar button or the corresponding command under the View menu, or by right-clicking on the category you want to limit the search to, and selecting the Search... item. You have several search options to choose from:

Search results are then browsed in the Search pane near the bottom border. Click on any item name to display the corresponding code.

You can bookmark the items you use more frequently to display them quickly. You can add a bookmark to the code item or category currently selected by clicking on either the New Bookmark toolbar button or the corresponding command under the Edit menu, or by right-clicking on the treeview item and selecting the New Bookmark... menu command.
Bookmarks are saved together with code items, and are therefore persistent between sessions. They are also user-specific, therefore if multiple users access the code library and add bookmarks, each user only sees his/her own bookmarks (provided that users log-in with different Windows accounts). All bookmarks created for the current code library are displayed in the Bookmark pane near the bottom border. You can make this pane taller or shorter by dragging the splitter bar that separates it from the other two panes in the upper portion of CodeBox for .NET's window.

Click on any bookmark to quickly display the related code item and category. You can delete the currently selected bookmark, or all the bookmarks, by using the commands in the listview's contextual menu or under the Edit menu, or by clicking the Delete Bookmark toolbar button.
You can export to HTML format the currently selected code item by clicking on either the Export toolbar button or the corresponding command under the File menu, or by right-clicking on the treeview item and selecting the Export... menu command. From the dialog window that pops up you can decide whether you want to export the VB.NET and C# code, the notes and all the dependent code items, and the destination file for the exported HTML.

Yet another option is the template file to use for the HTML being produced. A template file is an HTML-like file that defines the layout of the HTML that will be generated. In addition to the provided default template, you can create other templates, to add for example your company's logo and e-mail to the HTML files that will be produced, and to change the font, color, size and layout of the code and notes being exported. A template consists of standard HTML and of some special sections and metatags:
Please refer to the provided default template as a model for your own templates.
You can print the currently selected code item by clicking on either the Print toolbar button or the corresponding command under the File menu, or by right-clicking on the treeview item and selecting the Print... menu command. The dialog window that pops up is similar to the one described in the Exporting code items section, except you don't select a destination file. All the remaining options work the same way, and you can define multiple templates to print the code with different layouts.

You can access the Option dialog by clicking on the Options toolbar button or the homonymous command under the Edit menu.
The dialog has three tabs. In the first tab you can decide:

In the second tab you can set:

In the third tab you can set: