Copyright: © FMS Inc.


Help Contents
Contents

Introduction

Installation and Startup

Code Style, Conventions, and Usage

Code Explorer

Code Repository

Source Code Exchange

Code Editor

Product Support

License Agreement


Introduction

Product Highlights

What's New in this Version

Visit us on the Web

Getting Help


Installation and Startup

System Requirements

Installation Overview

Upgrading from a Previous Version

Program and Code Groups

Installation Strategies

Installing Total Visual SourceBook

Obtaining the Latest Version

Uninstalling Total Visual SourceBook


Code Style, Conventions, and Usage

Coding Overview

Consistency

Dependencies

Avoiding Conflicts with Your Code

Naming Conventions

Error Handling

Structured Programming Style and Formatting

Using Code Updates

By Reference versus By Value

Class versus Module

Commenting

Technical Level

Example Code


Code Explorer

Running the Code Explorer

Using the Code Explorer

Getting Code into Your Project

Printing Code

Finding Code with the Search Tool

Using Bookmarks

Setting Options

Administrative Features


Code Repository

Code Repository Overview

Importance of Backups

Multi-User Issues

System-Maintained Information

Adding New Items

Importing Code

Saving Classes, Modules, and Procedures

Editing Items

Deleting Code


Source Code Exchange

About Source Code Exchange

Creating an SCE Package

Importing an SCE Package

Importing Data from Another Code Library


Code Editor

Using the FMS Rich Text Editor

Editor Components

File Menu Options

Edit Menu Options

Insert Menu Options

Format Menu Options

Tools Menu Options


Product Support

Troubleshooting

Web Site Support

Contacting Technical Support


License Agreement

License Agreement


Product Highlights

Total Visual SourceBook is the most complete collection of fully tested and consistently documented Visual Basic, Access, Office and VBA source code. The efficient Code Explorer also includes a repository feature so you can maintain and manage your own code.

Extensive Code

With over 40 categories, 150 classes and modules, 2300 procedures and 85,000 lines of code, every major area of application development is covered:

• Forms and Controls	• Database: ADO, RDO, Jet, ODBC and DAO
• Error Handling	• File and Disk Operations
• Printing	• Graphics
• Access 97, 2000, and 2002	• Outlook 2000 and 2002
• XML	• Word 97, 2000, and 2002
• Excel 97, 2000, and 2002	• Word AutoConvert
• Internet and Web	• Statistics and Probability
• Math Routines	• Fonts
• Common Dialogs	• Multimedia Extensions
• Access, Word and Excel	• Searching and Sorting
• Soundex and Metaphone	• Password Encryption
• Compression Algorithms	• String Handling
• Parse and Tokenize Text	• Date and Time
• Year 2000 Routines	• Data Type and Unit Conversions
• Clipboard Operations	• Application Techniques
• INI and Help Files	• Windows Registry
• Abstract Data Types	• Rotated Text and Bitmaps
And much more!

History

In 1996, we introduced Total Access SourceBook for Microsoft Access developers. The following year, we introduced Total VB SourceBook for Visual Basic developers.

Since then the programming languages and developer communities have overlapped more and more. In 2000, we released Total Visual SourceBook 2000, which merged the two popular source code libraries and incorporated much new code and many new features. This version of Total Visual SourceBook supports Office 2000, Office XP, and Visual Basic 6.0.

Ideal for All Levels of Expertise

Regardless of whether you are a seasoned veteran or new to Visual Basic, VBA, or Office development, you will find the source code available in Total Visual SourceBook to be extremely helpful. Novice and intermediate developers will find it easy to solve basic programming tasks and learn new techniques. Advanced and expert programmers benefit from the product's advanced classes to support high-level database operations, hard-core API functionality, Windows graphic functions, and more. And because the source code is open and available for modification, experts can customize the code to their specific needs.

Designed Specifically for Visual Basic and VBA

Total Visual SourceBook was designed from the ground up for use with Visual Basic 6.0 and the integrated VBA environments in Microsoft Office 2000 and XP. It offers full integration with the Visual Basic Integrated Development Environment (VB IDE) and runs either from the Visual Basic Add-ins menu or as a standalone program.

You can select the code you want and insert it directly into your project. You can also export the code to the Windows Clipboard, a file, or open it with a text editor (such as Windows Notepad).

The program's Export dialog shows all of the existing forms, classes, and modules in your current project. To insert code, simply tell Total Visual SourceBook where you want the code to go. The Code Explorer also fully supports Visual Basic project groups.

Add Your Own Code to the Code Repository

Total Visual SourceBook allows you to add your own code to Total Visual SourceBook and make it available to your entire development team. You can insert your code into existing topics and categories or create new ones. You can also add descriptions, comments, and examples to your code. The Code Repository even tracks the author name, creation date, and modification dates.

All Code Is Fully Documented

The source code in Total Visual SourceBook is extensively documented with reference material describing how to use the code. There are also overviews of various areas of programming technology in Visual Basic, complete with references to other sources of information (such as computer books and web sites). Additionally, the product uses a consistent style of documentation and commenting throughout.

Powerful Search Engine

Finding the code you need is easy! Simply browse through the categories in the Treeview to see what is available. If you need a more powerful search mechanism, use the Code Explorer's Search Engine. Find code by keyword or phrase, or locate by author name, or creation and modification dates.


What's New in this Version

This version of Total Visual SourceBook has been enhanced to support Microsoft Office XP as well as Microsoft Office 2000 and Microsoft Visual Basic 6. It also includes new code for Office XP and for Active Server Pages (ASP).

Backward Compatible

The code you added to the code repository of Total Access SourceBook, Total VB SourceBook, and Total Visual SourceBook 2000 can be imported directly into Total Visual SourceBook. Additionally, if you own the Microsoft Office 2000 Developer's Edition, the code in its Code Librarian can also be imported into Total Visual SourceBook, so you can keep all of your important code in one place.

For more information, see  Upgrading from a Previous Version.

Advanced Code Sharing

Total Visual SourceBook makes it easy for you to use its code repository to share code with other developers. The Source Code Exchange format file lets you easily package your code for other Total Visual SourceBook developers.


Visit us on the Web

To provide you with the most current information about our products, FMS can be reached on the World Wide Web at www.fmsinc.com. Our site is being updated constantly with news and features for developers. Please drop by and take a look.

Product Announcements and Press Releases

Read the latest information on new products, new versions, and future products. Press releases are available the same day they are sent to the press. Sign up in our Feedback section to have press releases automatically sent to you via email.

Product Descriptions and Demos

Detailed descriptions on all our products are available. Each product has its own page with information on features and capabilities. Demo versions of several of our products are also available.

Product Registration

Register your copy of Total Visual SourceBook on-line. Be sure to select the email notification option so you can be contacted when updates are available or news is released. You must be registered to receive technical support.

Product Updates

FMS is committed to quality software. When we find problems in our products, we fix them and post the new builds on our web site. Check our Product Updates page in the Technical Support area for the latest build, or see Obtaining the Latest Version for information on how to check for the availability of updates.

Utilities and Free Software

Download free demos and utilities, including add-ins and tools for VBA, Office, and VB developers.

Technical Papers

FMS personnel often speak at conferences and write magazine articles, papers, and books. Copies and portions of this information are available to you on-line. Learn about our latest ideas and tricks for using Access and Visual Basic more effectively.

Newsgroups

Share your experiences, learn from others, and ask your questions in our virtual community. Point your browser to:

www.fmsinc.com/support/newsgrp.htm

Or visit our web site for additional instructions.

Links to Other Development Sites

Jump to other locations, including newsgroups, user group home pages, and other sites with Access and Visual Basic news, techniques, and related services.


Getting Help

Several options are available to get you to the information you need as quickly as possible.

At any time while using the program, you can press the [F1] key to open the program's help file. Additionally, most forms and dialogs have a [Help] button.

See Troubleshooting for more information.

The help menu has these additional resources:

FMS on the Web

This menu offers several options for getting help through the World Wide Web. It includes links to various pages that you may find helpful. See Web Site Support for more information.

Contact FMS

This option opens your email program and creates a new message addressed to support@fmsinc.com. Use this email address to report problems, request feature changes, or send complements or complaints about the product. See Contacting Technical Support for more information.

About

This dialog shows the program's version information and licensed user, and includes a link to the Microsoft Windows System Information utility, which can provide useful information for troubleshooting problems.


System Requirements

Total Visual SourceBook is written in Visual Basic, and its requirements are similar to those of Visual Basic itself:

•	Pentium processor or better

•	Microsoft Windows 98, Windows 98 Second Edition, Windows Millennium Edition (ME), Windows NT 4.0 (Service Pack 6 or higher), or Windows 2000

•	32 MB RAM (64 MB recommended)

•	Internet Explorer 4.01 or higher


Installation Overview

Total Visual SourceBook offers a great deal of flexibility in how it stores code and makes code available to multiple developers. Because the Code Repository feature is multi-user ready, you can install and configure the product to allow access to multiple developers. Alternatively, you can install the program on a single user computer so only you can access the code. See Installation Strategies for more information.

While the Setup program is designed to make installation as simple as possible, you should read the following sections in order to determine the configuration that best suits your needs:

Upgrading from a Previous Version

Program and Code Groups

Installation Strategies

Installing Total Visual SourceBook

Obtaining the Latest Version

Don't be too worried about making an incorrect choice or specifying a directory when you install the product—Total Visual SourceBook is designed to be quite flexible, and you can make changes later or re-run the Setup program to reconfigure the way the product is installed.


Upgrading from a Previous Version

If you have Total Visual SourceBook 2000, upgrading to the new version of Total Visual SourceBook is simple. The user code for both of these products is stored in the same file format, so you simply need to point to your Total Visual SourceBook 2000 user code database. Just be sure to install Total Visual SourceBook to a new directory—do not overwrite Total Visual SourceBook 2000 with the new version. For more information, see  Code Group Options.

If you have Total Access SourceBook or Total VB SourceBook installed, and you added your own code to their code repositories, you need to take a few extra steps.

After installation, Total Visual SourceBook makes it easy to import user code stored in one of these products. In addition, it can import code stored in the Microsoft Office 2000 Developer's Edition Code Library format.

Note: You should not uninstall your previous copy of SourceBook until you install Total Visual SourceBook and verify that you successfully imported your old code. Once your old code is in Total Visual SourceBook, you can uninstall the old version, and delete any databases or other files that may remain.

For now, just be sure to install Total Visual SourceBook in a different directory than the previous SourceBook product.

For complete information on importing code from previous versions of SourceBook, or other code libraries, see  Importing Data from Another Code Library.


Program and Code Groups

Total Visual SourceBook consists of two main components:

•	Code Explorer
The program that you run to view, search, and edit code.

•	Code Group
The set of two databases that store the FMS source code and the code you add to the Repository.

The Code Explorer consists of a Visual Basic executable, various DLL and OCX files, and entries in the system registry. Like Visual Basic itself, the program must be installed on a local computer for it to run. You cannot install it on a network drive and have other users to run it directly from there.

The two databases that comprise the Code Group can be installed on a local or shared drive. The FMS and User code databases can reside in different directories.

How the Code Group Works

Total Visual SourceBook stores source code in a Code Group that consists of two Microsoft Access (Jet 3.5 format) databases:

•	The built-in code (the source code that ships with the product) is stored in the FMS Code database. This file is TVSBIC90.MDB.

•	The code you add through the Code Repository is stored in the User Code database. This file is TVSBUC90.MDB.

One of the most powerful features of Total Visual SourceBook is that you can create and use multiple Code Groups. For example, you can install the product on your laptop computer, and on a shared network drive. In this configuration, you have access to the built-in code, along with your own code even when you are not connected to the network. You can also connect to a Code Group stored on the network to access your organization's shared code assets.

In another configuration, you can install the product on your local computer and create several Code Groups on your local drive to manage code for each of your projects. Of course, this scenario eliminates the usefulness of a common shared repository of code, but does allow compartmentalization if you need it.

To manage the use of multiple Code Databases, Total Visual SourceBook offers a Join option. This option allows you to "join" any Code database that you can see on your file system. For more details on using the Join option, see  Code Group Options.

Where Should I Install the Code Databases?

When you run the Setup program, you are prompted for the location of the Code Group. Remember that the Code Group consists of the FMS Code database and the User Code database that stores your code. The answer to this question determines whether or not you want other developers using Total Visual SourceBook to be able to access the code in a shared manner.

•	If you install the Code Group in a non-shared directory, such as a hard disk on your local machine, you are creating a single-user installation. In such a case, you are the only person who can access the Code Group.

•	If you install the Code Group in a shared directory, such as a network drive, other Total Visual SourceBook developers can access the built-in and user code. Such an installation is ideal for multi-developer teams.

Note that each user who wants to access a shared Code Group must have a separate licensed copy of Total Visual SourceBook. Therefore, your decision on where to install the Code Group is dictated primarily by whether or not you are implementing (or planning to implement) a multi-user installation of Total Visual SourceBook. The following strategies can help you make the decision in other scenarios.

Multi-User Database Access

Each developer using Total Visual SourceBook must have a licensed copy installed. When you attempt to access a shared Code Group, the program checks to ensure that no other developers are using your licensed copy. If the program detects a conflict, it disallows access to the shared Code Group. For example, if two developers install Total Visual SourceBook using the same license, those two developers cannot access the same shared Code Group at the same time.

Because you may have two or more copies of your VBA host open at the same time, Total Visual SourceBook allows multiple copies of the program to run on the same computer. Of course, once you start loading multiple copies of large programs like Visual Basic, you can run out of resources or experience severe performance degradation. Total Visual SourceBook, however, places no restrictions of its own on the number of concurrent instances per machine.

Please refer to the license agreement for details on licensing.

More information

While the Setup program is designed to make installation as simple as possible, you should read the following sections in order to determine the configuration that best suits your needs:

Upgrading from a Previous Version

Installation Strategies

Installing Total Visual SourceBook

Obtaining the Latest Version


Installation Strategies

This section outlines common installation scenarios and helps you decide how to install the product.

Simple Single User Installation

This is the simplest configuration. Install the program and the Code Group on your local drive. In this configuration, all files are local and the Code Group is not shared. This is also an ideal configuration for use when you are evaluating the functionality of Total Visual SourceBook for possible future use in a multi-user environment.

Simple Multi-user Installation

This installation allows multiple developers to share a single Code Group. In this scenario, you install the program and specify a shared drive for the Code Group. Setup then installs the program on your local computer, and installs the Code Group on the shared drive. You are now able to run the product on your computer, and the built-in code and user code is stored on the shared drive.

Later, each additional developer who wants to use Total Visual SourceBook runs the setup program with a unique license (serial number). When prompted for the Code Group location, that developer points to the shared network drive. The Setup program detects an existing Code Group and does not overwrite it. The Total Visual SourceBook program files are copied to the developer's machine. Repeat this step for each developer who wants to join the shared Code Group. Remember that the program requires each user to have a unique license (serial number) to access a shared Code Group.

Coexisting Single User and Multi-user Installations

In this scenario, you perform a standard single user setup to install the program and Code Group to your computer. This allows you to keep the user code on your machine private. Later, you can use the Join option available in the Code Explorer to point your installation of Total Visual SourceBook to different a Code Group stored on a shared drive. This way, you can switch back and forth between multiple Code Groups. See Code Group Options for more information on the Join option. This scenario is also ideal if you are running the program from a laptop computer that may sometimes be disconnected from your networks. In this case, when Total Visual SourceBook starts up and detects that a network Code Group is not available, it prompts you to point to another Code Group. In this case, you would point the program to your local Code Group. Note that if you make changes on your local Code Group, they are not automatically replicated to your network Code Group when you reconnect. In such a case, use the Source Code Exchange feature to replicate your data changes. See Source Code Exchange for more information this feature.

Creating a New Code Group

There may be situations when you want to install a Code Group on a specific drive, but already have Total Visual SourceBook installed on your computer. To do this, re-run the Setup program again and specify the new directory for the Code Group. This re-installs the program on your computer, and creates the new Code Group in the directory you specify. Note that this does not change any Code files located on your local drive—it merely creates new Code Group databases.

Single User Installation on a Shared Drive

Even if you are not working in a multi-user environment, you may want to consider installing your Code Group to a shared drive that is part of a backup/archive regimen maintained by your organization. This insures that your code is backed up for archival purposes.

For most developers, of course, local disk access is almost always faster than network disk access, so the performance penalty you pay while using Total Visual SourceBook may not be worth the convenience of a shared backup mechanism. If network performance is poor, install the Code Group locally and institute you own backup process. For more information on making backups, see  Importance of Backups.

More information

While the Setup program is designed to make installation as simple as possible, you should read the following sections in order to determine the configuration that best suits your needs:

Upgrading from a Previous Version

Program and Code Groups

Installing Total Visual SourceBook

Obtaining the Latest Version


Installing Total Visual SourceBook

This section contains the information you need to install Total Visual SourceBook on your computer.

Visual Basic Service Pack Version

Total Visual SourceBook is compiled using Visual Basic 6.0, Service Pack 3. This means the setup program may install updated versions of the VB runtime module (MSVBM60.DLL), the Common Control OCX (COMCTL32.OCX), and several other files on your machine.

File Backups

Before overwriting an existing shared component on your system, the Setup program verifies that its version is a later version than the one you have. Additionally, when you run the Setup program, you have the option to make backups of any replaced files. We recommend that you select this option so that you can restore your system to its prior state if necessary. For more information on uninstalling the program, see  Uninstalling Total Visual SourceBook.

Running the Setup Program

A standard Windows setup program is used. Please follow these steps to install Total Visual SourceBook:

Step 1 – Close all Programs

Before running the Total Visual SourceBook setup, please close any other programs, including virus scanners, disk utilities, and programs in your Windows Startup folder.

Step 2 – Start the Setup Program

Insert the CD in the drive. If AutoRun is enabled, the setup program starts automatically. If setup does not start, then in Windows, press the Start button and select RUN. Type the letter of the drive containing the Total Visual SourceBook CD ROM, followed by a colon and the word SETUP. For example, if D is the letter for the drive containing the CD ROM, type D:SETUP. After a moment, the Setup program starts.

Step 3 – Run the Setup Program

Follow the instructions in the setup program to install Total Visual SourceBook. Press the [Help] button on the setup screen at any time to receive help.

On some systems, you may need to restart Windows for the installation to be complete, and the setup program notifies you of the situation.

List of Files Installed

The INSTALL.LOG file in the Total Visual SourceBook installation directory lists the files installed plus a complete log of the Total Visual SourceBook setup, including overwritten files, and the registry entries and Start Menu items created.

Starting Total Visual SourceBook

Once you install Total Visual SourceBook, you are ready to run it for the first time. See Running the Code Explorer for more information.

More information

While the Setup program is designed to make installation as simple as possible, you should read the following sections in order to determine the configuration that best suits your needs:

Upgrading from a Previous Version

Program and Code Groups

Installation Strategies

Obtaining the Latest Version


Obtaining the Latest Version

FMS is committed to providing robust and reliable software. To this end, we provide regular updates to our products that provide enhancements and fixes to reported problems. Total Visual SourceBook supports two types of updates:

•	Program Service Pack
This type of update contains fixes and enhancements to the program itself: the Code Explorer, Code Repository, and on-line help.

•	Code Service Pack
This type of update contains enhancements to the library code and notes included with the product.

To see if an update is available for your product, check our web site at www.fmsinc.com, or use the program's Update Wizard.

Using the Update Wizard

Total Visual SourceBook includes a built-in mechanism that checks for the availability of updates via the web. If you have an active Internet connection, you can use the Total Visual SourceBook Update Wizard to ensure you have the latest Program Service Pack and Code Service Pack installed.

To run this program, press the Windows Start button and select Programs, FMS, Total Visual SourceBook, Update Wizard. Follow the prompts on the form to check for the latest update.


Uninstalling Total Visual SourceBook

Preserve Your Source Code

Before removing Total Visual SourceBook from your system, take steps to ensure any code that you need remains available to you after the program is uninstalled.

The Total Visual SourceBook uninstall process does not delete the code databases. This allows you to access your code after uninstalling simply by reinstalling the program. However, if you plan to uninstall Total Visual SourceBook and not reinstall it in the future, you will not be able to retrieve your code from the code databases. In this case, be sure to export your code to an external format (such as a VB/VBE project or text files) so that you can access your code without having the Total Visual SourceBook program installed.

Uninstalling

To remove Total Visual SourceBook:

•	Run Add/Remove Programs from your Windows Control Panel.

•	Select Total Visual SourceBook from the list and press the [Add/Remove] button.

•	Choose the "Automatic" option to ensure that files used by other programs remain on your system.

•	Follow the Wizard interface to uninstall the program.

After a few moments, the Total Visual SourceBook program files and its registry entries are deleted. The program no longer appears in either your Start menu, or the VB/VBA Add-Ins menu.

Please note that uninstalling does not restore backups of shared system components such as OCX and DLL files. Any system components that were replaced during installation are stored in the backup directory you specified. If you want to restore your system to its original state, you can move the files from the backup directory back to their original location. Before doing so, however, you should verify that no other programs on your system are relying on the new versions installed by Total Visual SourceBook.

Note: The uninstall program DOES NOT remove the FMS or User Code databases. The User Code database is your Code Repository and contains code you added. The FMS Code database is not deleted since multiple users could be pointing to it. To completely remove all of Total Visual SourceBook's files, manually delete the code databases.


Coding Overview

Every experienced programmer has his or her own idea of what constitutes good programming style. Although certain standards evolve over time within a programming community, it is inevitable that idiosyncrasies develop based on company standards, the need to be consistent with existing code, or even the personal preferences of influential team members.

Accordingly, it is impossible for the code style we selected for Total Visual SourceBook to satisfy 100% of developers. We believe the style guidelines we use are consistent with a large majority of development shops today, with respect to naming conventions, structured programming techniques, and object-orientation. Still, you may disagree with some of the choices we made.

The following sections discuss the guiding principles used in creating the code in Total Visual SourceBook. It gives you a better idea of the reasoning behind the choices we made, and prepares you to make modifications to suit your programming style.

Consistency

Dependencies

Avoiding Conflicts with Your Code

Naming Conventions

Error Handling

Structured Programming Style and Formatting

Using Code Updates

By Reference versus By Value

Class versus Module

Commenting

Technical Level

Example Code


Consistency

We placed a high premium on consistency in the style and techniques of the code in Total Visual SourceBook. After you use one procedure or class from Total Visual SourceBook, it should be very easy to find and use another one. There should be no arbitrary differences in naming conventions, commenting, or functional behavior.

If several related procedures are included in a module, you can be sure that they always work similarly. Our assumptions and standards are described, so you can easily convert from our standards to yours, if your situation requires it. For example, if you prefer a different variable naming convention to the one we use, it should be easy for you to translate our system to yours.

The following sections provide further information on the code style and conventions used in Total Visual SourceBook:

Coding Overview

Dependencies

Avoiding Conflicts with Your Code

Naming Conventions

Error Handling

Structured Programming Style and Formatting

Using Code Updates

By Reference versus By Value

Class versus Module

Commenting

Technical Level

Example Code


Dependencies

One of the primary goals of Total Visual SourceBook is that the source code provided should have no functional dependencies on any run-time components that we ship, such as OCXs, helper DLLs, or OLE type libraries. We are delivering source code, not binary components. The source code is inserted directly into your project. You do not need to think about distributing any other objects with your application.

In fact, one of the main benefits of the code in Total Visual SourceBook is that it allows you to eliminate some dependencies. For example, the code includes routines that replace the functions of the COMDLG32.OCX control, or the multimedia player OCX.

Code Dependencies

Every module and class is independent and can be inserted into your project and immediately work and compile. You do not need to use special compiler directives, create references, or try to track down dependencies when you insert a module or class into your project. The module or class acts as a true black box.

For modules, you may want to only grab a single procedure rather than the whole module. In most cases, this works, but there are cases where dependencies exist.

Declarations Dependency

The most common procedure dependency is when it uses a Windows API call, type, enum, or constant that is defined in the Declarations section of a module. For our purposes, the Declarations section of a module is treated as a "procedure," although it cannot be executed on its own. When a procedure has a dependency on the Declarations, Total Visual SourceBook keeps track of it and lets you automatically include it when you export the procedure.

Procedure Dependency

In limited cases, procedures in Total Visual SourceBook modules call other procedures within the module. The Code Explorer also handles these dependencies. When it comes time to export a procedure, you are given the option to automatically export all the other procedures that are called by the first one. Again, this is the exception, not the rule.

Class Dependencies

All of the class modules in Total Visual SourceBook are fully self-contained. We do not have any classes that call other classes or external procedures in Total Visual SourceBook.

In some cases, Total Visual SourceBook procedures in modules are also duplicated in classes as private helper functions. This results in slight duplication of code, but helps us achieve the no-dependency rule for classes.

The no-dependency rule precluded us from using certain styles of object-oriented functionality, such as using container classes or using the Implements keyword to achieve polymorphism. Future versions of Total Visual SourceBook may relax this requirement; please let us know how you feel.

Other Dependencies

Naturally there are some dependencies on features that are external to Total Visual SourceBook itself. For example, a certain procedure might require that you create a reference in your project to the Microsoft ADO library, or that you have a certain version of the Windows common controls installed on your machine. For example, certain functions may work on Windows 9x, but not on Windows NT. Consult the Dependencies information available in the Code Explorer's Details tab, and the code Notes for complete details.

Further Information

The following sections provide further information on the code style and conventions used in Total Visual SourceBook:

Coding Overview

Consistency

Avoiding Conflicts with Your Code

Naming Conventions

Error Handling

Structured Programming Style and Formatting

Using Code Updates

By Reference versus By Value

Class versus Module

Commenting

Technical Level

Example Code


Avoiding Conflicts with Your Code

Because we limit dependencies in our code, it should be highly unlikely that adding Total Visual SourceBook procedures or classes to your project will create conflicts with your existing code. All Windows API declarations and constants are declared as "Private," so they are only scoped to the class or module where they occur. If a procedure takes an argument that is a constant, the constant value is provided via a uniquely-named enumerated type rather than via a public constant.

The only likely conflict is with the name of the procedure or class itself. If you already have a procedure with the same name as a procedure you are attempting to import from Total Visual SourceBook, your code will not compile. If you previously exported a Total Visual SourceBook procedure or class to your project, and you are not sure if it differs from the version in the Total Visual SourceBook browser, you can examine the comment line labeled "Source" to determine from which version it came.

If you have name conflicts, and you are unable to modify your existing code, one option is to save the Total Visual SourceBook procedure under another name in the browser, and then export the procedure from there.

The following sections provide further information on the code style and conventions used in Total Visual SourceBook:

Coding Overview

Consistency

Dependencies

Naming Conventions

Error Handling

Structured Programming Style and Formatting

Using Code Updates

By Reference versus By Value

Class versus Module

Commenting

Technical Level

Example Code


Naming Conventions

Naming conventions are a touchy area for most developers. Opinions on the proper use of naming conventions vary much more widely than the consensus on other programming areas, such as the use of comments and structured programming style.

You may be among the developers who strongly believe that there should be no naming conventions at all. Or you may use a convention borrowed from the Microsoft-created "Hungarian" style directly from an entirely different language like C++. Some naming conventions are more idiomatic to the Basic language, such as using type declaration characters on variable names (Dim Name$ for example). Or you may be using a completely "non-standard" style that is dictated by the organization for which you develop.

As with many other areas of programming, the true value of using naming conventions may be the consistency they provide, rather than the merits of any one particular standard.

That said, we had to choose one consistent naming convention for the procedures and classes in Total Visual SourceBook. The style we selected is a variation on the recommendations that Microsoft makes in the "Visual Basic Coding Conventions" chapter of the VB Programmer's Guide.

These include naming standards for controls, objects, menus, properties, types, constants, and other standard objects. The naming conventions also indicate scope, and whether or not the variable is part of an array or a collection.

The code available in Total Visual SourceBook uses the following variable naming conventions.

Variable Type	Tag	Example
Boolean	f	fIsLoaded
Byte	byt	bytOffset
Currency	cur	curAmountDue
Date	dat	datExpires
Double	dbl	dblOffset
Enumerated Type definition	Enum	EnumJetObjectTypes
Enumerated Type use	e	eObjectType
Integer	int	intCounter
Long Integer	lng	lngFrequency
Module	mod	modApplication
Object	obj	objExcel
String	str	strLastName
Variant	var	varObject
Array	a	astrNames
Constant	c	cintMaxValue
For controls and other objects available in Visual Basic, the following naming conventions are used:

Object Type	Tag	Example
Class	C	CEncryption
Control	ctl	ctlListBox
Form	frm	frmMainMenu
For database objects defined in the DAO, RDO, or ADO interfaces, the following naming conventions are used:

Object Type	Tag	Example
Command (ADO)	cm	cmUpdate
Connection (ADO)	cnn	cnnPubs
Container	con	conForms
Database	dbs	dbsCurrent
Document	doc	docTmp
Field	fld	fldLastName
Parameter (ADO & DAO)	prm	prmCustID
QueryDef	qdf	qdfSelect
Recordset (ADO & DAO)	rst	rstOrders
TableDef	tdf	tdfCustomers
To indicate the scope of a variable, the following scope tags are prefixed to the variable name:

Scope	Tag	Example
Module level variable	m	mstrLastName
Public variable	g	gstrLastName
Local variable to support property procedure values	m_	m_datCurrentDate
Windows API Declarations

Wherever the code contains a declaration to a procedure in the Windows API, the variable names and naming conventions published by Microsoft in the API Programmers Reference are used instead of the above naming conventions. This ensures that our declarations match the Windows API.

Further Information

The following sections provide further information on the code style and conventions used in Total Visual SourceBook:

Coding Overview

Consistency

Dependencies

Avoiding Conflicts with Your Code

Error Handling

Structured Programming Style and Formatting

Using Code Updates

By Reference versus By Value

Class versus Module

Commenting

Technical Level

Example Code


Error Handling

There are as many approaches for error handling as there are programmers. Each of us implements error handling in our own way because error handling logic is much more tied to the specific procedure than are naming conventions. Because of this, we tried to keep our error handling from getting in your way. We accomplish this by taking a minimalist approach to error handling—we don't want you to deal with complex error handling setup and maintenance every time you use the product's source code.

However, we strongly feel that every non-trivial subroutine, function, and property procedure should have a minimum level of error handling which accomplishes the following goals:

•	Identify the name of the procedure with the error

•	Display the error code and error message

•	Prevent your program from crashing with a fatal run-time error

The following is the structure of the standard generic error handling style used in the code in Total Visual SourceBook:

Function GenericFunction() as Boolean
  ' Comments  : Comments about GenericFunction
  ' Parameters: None
  ' Returns   : True or False
  ' Source    : Total Visual SourceBook
  '
  On Error GoTo PROC_ERR

  Debug.print 1 / 0

PROC_EXIT:
  Exit Function

PROC_ERR:
  MsgBox "Error: " & Err.Number & ". " & Err.Description, , _
    "GenericFunction"
  Resume PROC_EXIT

End Function

When this function is called, it generates a run-time error:

Generic Error Handler Results

The generic error handler is always established at the beginning of the procedure by using "On Error GoTo PROC_ERR." The procedure error label is always called PROC_ERR, so it is easy to locate and modify if this is required by your standards. To remove our generic error handling code, simply delete the "On Error GoTo PROC_ERR" line, and the lines between "PROC_EXIT" and the end of the subroutine or function.

The generic error handler is never intended to be triggered by the normal operation of the function. Its only purpose is to trap and identify a run-time error and stop your application from crashing. We do not have any procedures whose normal means of exit is via the error handler label.

In fact, labels and the "GoTo" statement in Total Visual SourceBook procedures are only used for error handling. Rarely, if an error condition is detected that is not an actual run-time error, the code may explicitly branch to the "PROC_EXIT" label. See the section below on structured programming style for more information on this exception.

Note: We have used this same style of error handling in the standalone procedures and functions, as well as in the procedure and property members of the class modules. This was done for consistency and to provide a minimum fallback level of error handling. You may wish to have errors in your classes raised back to the caller rather than having the class members process the error handling manually with message boxes. This is especially important if you expose the classes from automation servers where there would be no "user" available to respond to the message box prompts. If you wish to have the caller of your class handle run-time errors, simply strip out the error handling in the class members altogether, or replace it with custom error handling appropriate to your application.

The following sections provide further information on the code style and conventions used in Total Visual SourceBook:

Coding Overview

Consistency

Dependencies

Avoiding Conflicts with Your Code

Naming Conventions

Structured Programming Style and Formatting

Using Code Updates

By Reference versus By Value

Class versus Module

Commenting

Technical Level

Example Code


Structured Programming Style and Formatting

The procedures, functions, and class methods used in Total Visual SourceBook follow the generally recognized standards for structured programming style. The following list includes the standards we use:

•	Each subroutine or function has only a single exit point. "Exit Sub" and "Exit Function" are not used, except in the context of a single defined exit label.

•	The "GoTo" statement is not used except to enable a module-level error handler. Similarly, the "GoSub" statement is not used. In rare cases, an unconditional branch to the procedure exit label may be used in order to avoid deeply-nested conditional code.

•	Line labels are not used except for procedure handling exit points.

•	There is no reliance on public or global variables for procedures. A class may have static shared data associated with it, but procedures and functions have no external data dependencies.

We use standardized formatting for items such as indenting, where local variables are declared, how in-code comments are formatted, and how error handling is enabled. While the standards may not match yours, we hope our consistent use of the same standards throughout the code make it easy for you to understand and use it.

The following sections provide further information on the code style and conventions used in Total Visual SourceBook:

Coding Overview

Consistency

Dependencies

Avoiding Conflicts with Your Code

Naming Conventions

Error Handling

Using Code Updates

By Reference versus By Value

Class versus Module

Commenting

Technical Level

Example Code


Using Code Updates

The power of Total Visual SourceBook is that its source code becomes integrated into your applications where you can customize it to your specific needs.

While this is certainly valuable, it does have one drawback. FMS may provide updates to Total Visual SourceBook in the form of Code Service Packs. These updates can be downloaded from our web site and contain enhancements and fixes to reported problems in the FMS source code.

When you apply a Code Service Pack, the code in the product's Code Explorer may be different from the code you inserted into your project earlier. The new code's comment section includes the service pack number so you can easily identify the code's version. If you never changed the FMS source code, applying the new code is easy—just find the procedure or class in your project and overwrite the code with the new version available in the Code Explorer.

However, if you changed the FMS source code, you can't just overwrite your version with the new code—this would overwrite your customizations.

To handle this situation, you should take the time to document your changes and additions to the FMS code. For example, if you use an FMS class in your project and then add additional property statements and methods, or make changes to existing ones, be sure to document those changes in the comment header for the class. Later, when you want to apply the changes available in a Code Service Pack, you can quickly determine which code is in its original state from Total Visual SourceBook, and which is modified.

The following sections provide further information on the code style and conventions used in Total Visual SourceBook:

Coding Overview

Consistency

Dependencies

Avoiding Conflicts with Your Code

Naming Conventions

Error Handling

Structured Programming Style and Formatting

By Reference versus By Value

Class versus Module

Commenting

Technical Level

Example Code


By Reference versus By Value

When information must be returned from a procedure, it is done with the return value of a function rather than by modifying a passed argument by reference. Exceptions to this rule include cases where the procedure populates a passed array or type structure, or when more than one item of information must be returned.

The following sections provide further information on the code style and conventions used in Total Visual SourceBook:

Coding Overview

Consistency

Dependencies

Avoiding Conflicts with Your Code

Naming Conventions

Error Handling

Structured Programming Style and Formatting

Using Code Updates

Class versus Module

Commenting

Technical Level

Example Code


Class versus Module

In many cases it is a judgment call whether to use a standard module to group related functions or to create a class module. These are the guidelines we use to determine that a class should be used rather than a standard module:

•	More than one procedure requires access to common data (for example, a pointer to an object variable such as a form, control, or database object)

•	The procedure must remember "state" information between calls

•	You may want to have more than one instance of the code be running at the same time without interfering with other instances

The following sections provide further information on the code style and conventions used in Total Visual SourceBook:

Coding Overview

Consistency

Dependencies

Avoiding Conflicts with Your Code

Naming Conventions

Error Handling

Structured Programming Style and Formatting

Using Code Updates

By Reference versus By Value

Commenting

Technical Level

Example Code


Commenting

In addition to the reference material available in the Total Visual SourceBook Code Explorer, all of the procedures include extensive in-code comments.

Each Declaration, subroutine, function, or class property procedure includes a structured comment block indicating the purpose of the function, a description of its arguments, and return values.

Procedures also include in-line comments to clarify the purpose of tricky or non-obvious code.

Administrative Comments

In addition to the comments that explain the purpose and workings of the code, every procedure contains a line indicating that the source code comes from Total Visual SourceBook:

  ' Source   : Total Visual SourceBook

This line is included so you always know which code in your project came from Total Visual SourceBook. While you do not have to keep this comment line in your project, if you take it out, you may have difficulty determining which code came from you or Total Visual SourceBook.

Additionally, if the procedure changed, the comment block contains information on the update(s). As we update procedures, we make the changes available to registered users in Code Updates available from our web site.

  ' Source   : Total Visual SourceBook
  ' Updated  : Code Service Pack 2

If you apply a Code Update to your Total Visual SourceBook installation, you want to be sure your applications contain the latest version of Total Visual SourceBook code. Rather than doing a line-by-line comparison of the old and new versions, you can simply check your project's comment code against the updated version's comments.

The following sections provide further information on the code style and conventions used in Total Visual SourceBook:

Coding Overview

Consistency

Dependencies

Avoiding Conflicts with Your Code

Naming Conventions

Error Handling

Structured Programming Style and Formatting

Using Code Updates

By Reference versus By Value

Class versus Module

Technical Level

Example Code


Technical Level

Some of the routines in Total Visual SourceBook make use of Windows API calls to provide functionality that is not available natively in VB/VBA itself, or to replace standard VB/VBA functionality with a more efficient API method.

In most cases the code is self-explanatory, but we have not attempted to provide alternate documentation for the Windows API. If you have questions about the techniques used, please refer to Microsoft's documentation.

Although our code uses some fairly advanced techniques, nothing in our code is wildly "hard core" or over the edge in terms of maintainability, reliability, and level of difficulty. We do not hack OLE type libraries, or use any other bleeding edge techniques. There are certainly routines that could cause problems if used incorrectly, but that is true any time you use Windows API calls or calls into other external DLLs.

The following sections provide further information on the code style and conventions used in Total Visual SourceBook:

Coding Overview

Consistency

Dependencies

Avoiding Conflicts with Your Code

Naming Conventions

Error Handling

Structured Programming Style and Formatting

Using Code Updates

By Reference versus By Value

Class versus Module

Commenting

Example Code


Example Code

The code solutions in Total Visual SourceBook include example code to show how the code is called, and the syntax used. All example code is accessible directly in the Code Explorer by using the Example Tab. An example exists for every class and module in Total Visual SourceBook.

To get you up and running as quickly as possible, we've implemented each example as a ready to run form. To use the example code, follow these steps:

1.	Create a new project in VB or the VBA host language you are using. While this step is not required, you may want to do this so you do not create example objects in one of your "real" projects.

2.	Export the class or module you want to test into your new project by using the Total Visual SourceBook Export Dialog.

3.	Create a new form, document, or spreadsheet in your project. Don't worry about naming the object, since it is only a sample object in a sample project.

4.	Follow any additional directions contained in the comment text at the top of the code. These directions usually require you to add one or more controls to your new form or document.

5.	Paste the entire contents of the Example code into the new object's module and run it.

The following code shows a representative Example:

' Example code for modToolbar
'
' To try this example, do the following:
' 1. Create a new form
' 2. Create a toolbar named 'ToolBar1'
' 3. Create a command button named 'cmdFlat'
' 4. Paste all the code from this example to the new form's module.

Private Sub cmdFlat_Click()
  Static fFlat As Boolean

  fFlat = Not fFlat

  ' Example code for SetToolBarFlat
  ' This code toggles the toolbar style between regular mode
  ' and 'flat' mode

  SetToolBarFlat Toolbar1, fFlat

End Sub

Private Sub Form_Load()
  Dim tbn As ComctlLib.Button

  With Toolbar1
    Set tbn = .Buttons.Add(, , "Button 1")
    Set tbn = .Buttons.Add(, , "Button 2")
    Set tbn = .Buttons.Add(, , "Button 3")
    Set tbn = .Buttons.Add(, , "Button 4")
  End With

End Sub

The following sections provide further information on the code style and conventions used in Total Visual SourceBook:

Coding Overview

Consistency

Dependencies

Avoiding Conflicts with Your Code

Naming Conventions

Error Handling

Structured Programming Style and Formatting

Using Code Updates

By Reference versus By Value

Class versus Module

Commenting

Technical Level


Running the Code Explorer

Starting the Program

Total Visual SourceBook supports two modes of operation: Standalone and Add-In.

Standalone

In Standalone mode, you start the program directly from Windows. Use this mode when you do not have Visual Basic or your VBA host open and want to use Total Visual SourceBook on its own. From the Windows Start menu, select Programs, FMS, Total Visual SourceBook 2002, Total Visual SourceBook.

Alternatively, you can execute the file named TVSB.EXE located in the program directory you specified during installation.

Add-In

In Add-In mode, you start Total Visual SourceBook from within the Visual Basic integrated development environment. This is probably the most common way to start the program because, as an add-in, Total Visual SourceBook can export code directly into your VBA Project.

To launch Total Visual SourceBook as an add-in, open the VBA integrated development environment (IDE) for your application. For example, in Microsoft Access, open a new or existing module. In Microsoft Word, select Tools, Macro, Visual Basic Editor. Consult your product documentation on using the VBA environment in your particular application.

Select Add-Ins, Total Visual SourceBook from the VBA IDE Menu.

Visual Basic Add-Ins menu

Please note that if you already have a standalone instance of Total Visual SourceBook open, this instance is used when Total Visual SourceBook is invoked from the add-in menu.

When using multiple instances of your host VBA application, each instance invokes a new copy of Total Visual SourceBook. This allows Total Visual SourceBook to work correctly with multiple instances of the application.

User Login Form

The first time you run Total Visual SourceBook, the User Login form appears:

Total Visual SourceBook Login Form

Use this form to identify yourself to the Total Visual SourceBook program. Your user name is very important because Total Visual SourceBook uses it to identify you as the owner of the procedures you add using the Code Repository.

The Login form initially shows your Windows user name. You may type in any name you wish to use as your identifier to the program. It is generally a good idea to use the same user name that your installation of Windows uses, or your network login name. This eliminates the confusion of having multiple user names. Once you enter your user name, press the [Continue] button and the Code Explorer program continues to load.

The next time you start the program, the Login form is bypassed, and the user name you initially specified is automatically used. You can change your User Name at any time using the Options dialog (see User Name Replace for more information).

Using the Locate Code Group Dialog

When you start Total Visual SourceBook, the Code location you last used determines the code you see. The Code Group consists of the FMS Code database and the User Code database containing the code you or your team members added.

If the last Code Group you used is not available when Total Visual SourceBook starts, the program displays the following message:

Locate Code Group Dialog

Press the [OK] button to open the Locate Code Group dialog and specify the directories for the FMS and User Code databases. This situation can occur for a number of reasons:

•	The shared drive holding the Code Group is not currently available. For example, you are using a laptop computer that is not currently connected to the network. Use the Locate Code Group dialog to point to the directory where you installed Total Visual SourceBook on your machine. This allows you to continue using the program even if you are disconnected from the network drive. Of course, this means you won't have access to the User Code available in the shared Code Group.

•	The Code Group was deleted or moved. Determine the location of the Code Group and select it with the dialog.

•	The Code Group is corrupt or damaged. In such cases, restore a backup copy of the Code Group.

•	Another user is running an administrative operation on the shared Code Group. This exclusively locks the databases. For example, while the "Compact Databases" operation is running, the Code Group databases are locked and access is disallowed. If this is the case, press the [Cancel] button on the Locate Code Group dialog and wait until the databases are available again.

Joining Other Code Groups

You can change the Code Group that the program uses by selecting Tools, Options from the menu and pressing the Code Group tab (see Code Group Options for more information).

For more information on Code Groups and how to use them effectively, see  Program and Code Groups.

Further Information

The following sections provide more information on the Code Explorer:

Using the Code Explorer

Getting Code into Your Project

Finding Code with the Search Tool

Using Bookmarks

Setting Options

Administrative Features

Running the Code Explorer


Using the Code Explorer

When you start Total Visual SourceBook, the  Code Explorer appears.

Code Explorer

This is where you do most of your work. The Code Explorer is used to find Total Visual SourceBook's own procedures as well as to create, copy, and edit your own procedures. The Code Explorer interface is divided into three main areas:

•	The Treeview Window shows all topics, categories, classes, modules, and individual procedures.

•	The Information Window shows detailed information about the current item selected in the Treeview. Details include the code, notes, and example code.

•	The Tracking Window at the bottom shows Search Results and all the Bookmarks you defined.

Toolbar and Menus

Total Visual SourceBook offers many features that make it easy to find, manage and export code. These features are accessible through three areas:

•	The program menu at the top of the window.

•	The program toolbar just below the menu. You can customize the toolbar by selecting View, Toolbars, Customize from the menu.

•	Context menus available by right-clicking on various objects in the window.

Status Bar

At the bottom of the Total Visual SourceBook Code Explorer, a status bar indicates the current item in the Treeview, and displays a description for the current item.

Status Bar

Further Information

The following sections provide more information on the Code Explorer:

Running the Code Explorer

Getting Code into Your Project

Finding Code with the Search Tool

Using Bookmarks

Setting Options

Administrative Features

Running the Code Explorer

More:

Toolbar Icons

Code Explorer Windows


Toolbar Icons

The Toolbar appears just below the menu:

Total Visual SourceBook Toolbar

The icons are organized into five groups:

•	Display Icons

•	Search and Export Icons

•	Code Repository Icons

•	Bookmark Icons

•	Print Icon

See Using the Code Explorer for more information.

More:

Display Icons

Search and Export Icons

Code Repository Icons

Bookmark Icons

Print Icon


Display Icons

The first set of icons controls the code you see.

 Back

Also available from the View, Back menu, this feature moves to the previously selected item in the Treeview. A history list is maintained so you can move back several levels.

 Forward

Also available from the View, Forward menu, this icon is available if Back was used. This feature moves to the next item in the history list.

 Refresh

Also available from the View, Refresh menu, this feature refreshes the Treeview by re-reading the contents of both the FMS code and User code databases. This is useful in multi-user installations when other developers in a shared Code Group change the contents of the database. If they add, edit or delete items, Total Visual SourceBook does not automatically update the display to show the most current changes. The Refresh option ensures you are viewing the most current data.

See Refreshing the Treeview for more information.

 Expand All

Also available from the View, Expand All menu, this feature displays all items in all categories.

 Collapse All

Also available from the View, Collapse All menu, this feature collapses the Treeview items so only categories are visible.

 Show FMS Code

Also available from the View, FMS Code menu, this setting causes the Treeview to show only the code that ships with Total Visual SourceBook.

 Show User Code

Also available from the View, User Code menu, this setting causes the Treeview to show only code that you or your team members added to the Code Repository.

 Show Both FMS and User Code

Also available from the View, Both menu, this setting shows all the FMS and user code.

See Toolbar Icons for more information.


Search and Export Icons

The second set of icons helps you find and extract the code you want.

 Search

Also available from the Tools, Search menu, this icon opens the Total Visual SourceBook Search form to begin a search.

 Copy

Also available from the Edit, Copy menu, this feature copies the text displayed in the Information Window to the Windows clipboard.

 Export

Also available from the File, Export menu, this feature exports the item currently displayed in the Treeview to the clipboard, notepad, a text file, or Visual Basic. For more information, see  Exporting Code.

See Toolbar Icons for more information.


Code Repository Icons

The third set of icons is for the Code Repository and helps you add and manage user code and categories.

 Save As

Also available from the File, Save As menu, this feature saves the item currently displayed in the Code Explorer Treeview under a new name. You can save either FMS procedures or your own procedures with this feature. See Saving Classes, Modules, and Procedures for more information.

New Topic

Also available from the File, New Topic menu, this feature adds a new user Topic to Total Visual SourceBook.

 New Category

Also available from the File, New Category menu, this feature adds a new user Category to Total Visual SourceBook.

 New Class or Module

Also available from the File, New Class/Module menu, this feature adds a new user class or module to the Total Visual SourceBook code base.

 New Member or Procedure

Also available from the File, New Method/Procedure, this feature adds a new class member or module procedure.

 Delete

Also available from the File, Delete menu, this feature deletes a user item. Note that you cannot delete FMS items.

Edit Topic

Also available from the Edit, Topic menu, this feature opens the Total Visual SourceBook Edit Topic form to edit the topic currently displayed in the Treeview. You may only edit user-defined topics, not FMS topics.

 Edit Category

Also available from the Edit, Category menu, this feature opens the Total Visual SourceBook Edit Category form to edit the category currently displayed in the Treeview. You may only edit user-defined categories, not FMS categories.

 Edit Class or Module

Also available from the Edit, Class/Module menu, this feature opens the Total Visual SourceBook Edit Class/Module form to edit the current class or module displayed in the Treeview. You may only edit user-defined code, not FMS code.

  Edit Member or Procedure

Also available from the Edit, Member/Procedure menu, this feature opens the Total Visual SourceBook Edit Category form to edit the current class member or procedure displayed in the Treeview. You may only edit user-defined code, not FMS code.

See Toolbar Icons for more information.


Bookmark Icons

The next set of icons helps you create and manage bookmarks. For more information on bookmarks, see  Using Bookmarks.

 New Bookmark

Also available from the Edit, New Bookmark menu, this icon creates a new bookmark for the selected item in the Treeview.

 Edit Bookmark

Also available from the Edit, Edit Bookmark menu, this icon edits the current bookmark in the bookmark pane.

 Delete Bookmark

Also available from the Edit, Delete Bookmark menu, this icon deletes the bookmark currently selected in the bookmark pane.

See Toolbar Icons for more information.


Print Icon

 Print

Also available from the File, Print menu, this icon prints the currently displayed item in the Code Explorer. For more information, see  Printing Code.

See Toolbar Icons for more information.


Code Explorer Windows

The Code Explorer is composed of three main windows:

•	Treeview Window
Displays the code topics, categories, modules, and procedures in a hierarchical tree.

•	Information Window
Shows the actual code, notes, and other relevant information on the selected code object.

•	Tracking Window
Lists the Search Tool results and any Bookmarks you set.

See Using the Code Explorer for more information.

More:

Treeview Window

Information Window

Tracking Window


Treeview Window

The Total Visual SourceBook Code Explorer Treeview is a graphical, hierarchical display of both FMS and user-written code.

The Treeview is designed to make it easy to find the code you want. All the code is organized into topics and categories.

Code Explorer Treeview

Topics

Each topic covers a major product or area of functionality, such as "Database" or "Access." In this case, code pertaining to database use that is not specific to the product Microsoft Access is kept in the "Database" topic. Code that is specific to Microsoft Access (e.g. code dealing with Access Reports) is under the "Access" topic. One of the largest topics is the "VBA" topic, which includes code that is generic to all VBA host environments.

Categories

Within a topic, a Category organizes areas of functionality. For example, there is a "Forms" category under both the "Access" and the "Visual Basic" topic. Code in the "Forms" category under the "Visual Basic" topic has code that is specifically designed for use with Visual Basic forms. Code in the "Forms" category under the "Access" topic is designed to only work with Access forms.

Classes and Modules

Each category contains classes and/or modules. Each class contains its members (properties, methods, and procedures), and each module contains procedures. By clicking on each level, the next level expands, similar to Windows Explorer.

The following items are displayed in the Treeview:

Topic – A topic contains categories.

 	Category – A category contains classes and modules.

 	Class – A class implements properties and methods.

 	Property – A property is a property of a class.

 	Member – A member is a member of a class (sub or function).

 	Module – A module contains procedures.

Snippet Module – A snippet module is just the same as a regular module, except that it can contain any code snippets, text, notes, or information.

 	Procedure – A procedure is contained in a module.

To display a list of classes and modules in a selected category, double-click on the category in the Code Explorer Treeview. To show the list of procedures and properties available in a module or class, double-click on the item or press the [+] in the Treeview. To hide the list within an item, double-click again. You may also navigate through the list by using the arrow keys, and you may open or close the item by pressing the [Enter] key.

Total Visual SourceBook displays FMS code, user-written code, or both, depending on the setting of the View you have selected with the menu or toolbar.

The icons for user-written code are similar to those shown above, except that they are marked with a small blue "u" symbol in the lower-left-hand corner of the icon:

When you select a particular item in the Code Explorer Treeview, the code is displayed in the Code Window to the right. If you select a category rather than a code item in the Treeview, a short description of the category is displayed in the Code Window.

Treeview Context Menu

As a convenience, a context-sensitive popup menu is available when you right click on the Code Explorer Treeview. This menu duplicates the relevant choices on the toolbar and menu. See the toolbar section for more information on each menu item.

Treeview right-click popup menu

See Code Explorer Windows for more information.


Information Window

The Information Window is a tabbed display containing details on the currently selected item in the Treeview. As you click on items in the Treeview, the information in the Information Window reflects the item you select.

Code Tab

When the Code tab is selected in the Information Window, the source code of the currently selected item in the Code Explorer Treeview is displayed.

Code Tab

If the Code Explorer is currently on a topic or category rather than on a code item, the Code Tab is empty. This is because code is not stored at the Topic or Category level.

Although you cannot edit code displayed in this window, you can select and copy it to the Windows clipboard. This is a convenient and quick way to copy a selected procedure without going through the File, Export process.

Notes Tab

The Notes tab shows detailed information on the item that is currently selected in the Treeview.

Notes Tab

The contents of the Notes tab depends on the type of item you currently have selected in the Treeview:

When you click on:	The Notes Tab displays:
Code Topic	A description of the topic
Code Category	A description of the category and a list of the class and module objects it contains
Class or Module	An overview of what the class or module does, and details on using the class or module in your project
(Declarations) code	No information
Procedure (Function, Sub, Property, or Event)	Detailed information on the procedure, including parameter descriptions, return values, and code-specific information
Example Tab

The Example tab provides an example for using the current class or module. If you are on an individual procedure, the example for the entire class or module is displayed. This tab is empty if you are on a category.

Example Tab

For more information on using the Example code, see page  Example Code.

Details Tab

This tab of the Code Window tab displays detailed information about the selected procedure:

Details Tab

See Code Explorer Windows for more information.


Tracking Window

The Tracking Window appears at the bottom of the Code Explorer window and shows Search Results and Bookmarks.

Search Results Tab

The Search Results tab displays the results from the last Search run. For more information, see  Using the Search Results.

Search Results Tab

Bookmarks Tab

The Bookmarks tab displays the bookmarks set on code. For more information, see  Using Bookmarks.

Bookmarks Tab

See Code Explorer Windows for more information.


Getting Code into Your Project

Once you find the class, module, or procedure you want in the Code Explorer, you need to get it into your project. There are two ways to do this:

•	Copy
Copy one item or selected text to the clipboard; you can then paste it into your project.

•	Export
Retrieve an item and its dependencies; you have the option to send it to the clipboard, file, or Notepad. If you launched Total Visual SourceBook as an add-in, you can export the code directly into your project.

More:

Copying Code to the Windows Clipboard

Exporting Code


Copying Code to the Windows Clipboard

The Copy toolbar button [image] is available to copy the current item to the clipboard quickly. This feature is integrated with the [Ctrl-C] key combination. When an item is displayed in the Code Window, you can press [Ctrl-C] to copy the entire item to the clipboard without having to highlight the item's text. If a module procedure is selected, and the procedure contains dependencies, a dialog appears asking you to copy just the procedure or open the Export dialog to see the dependencies.

Copy or Export Dialog

Note that if you highlight a portion of the procedure in the Code Window, and press [Ctrl-C], Total Visual SourceBook does not check for dependencies, and only copies the highlighted portion of the text to the Windows clipboard.

See Getting Code into Your Project and Exporting Code for more information.


Exporting Code

Use the Export tool from the toolbar [image] or select File, Export from the Code Explorer menu.

Export Form

The name of the item is shown at the top of the form. If the procedure requires other procedures or declarations in order to work, they are listed in the "Code Dependencies" list box. If there are other dependencies, such as a certain version of Microsoft Internet Explorer, this is listed in the "Other Dependencies" list box. You can modify the way the exported code is generated by setting the following options:

•	Include Dependencies— export the selected procedure and all dependent procedures.

•	Tab Width— specify the number of spaces to indent each line of code.

You can set the default values for these options under Tools, Options on the Export tab. For more information, see  Setting Options.

See Getting Code into Your Project for more information.

More:

Getting the Code into Your Project


Getting the Code into Your Project

There are four destinations for exporting code:

•	Clipboard— The Windows clipboard

•	Notepad— The Windows Notepad application (NOTEPAD.EXE)

•	File— A saved file consisting of ASCII text

•	Project— A VBA project (this is only available if Total Visual SourceBook was launched as an add-in)

Exporting to the Clipboard

With the [Clipboard] option, the code is sent to the Windows clipboard. To add it to your project, simply paste the clipboard contents into an open module. Place the cursor at the end of an existing procedure definition (the [Ctrl-End] key combination moves you to the end of the module) and press [Ctrl-V] or select Edit, Paste from the menu. The code from Total Visual SourceBook appears in your module.

Exporting to Notepad

With the [Notepad] option, the code appears in a Notepad document. Use the Notepad document as a temporary work area. Highlight the code in Notepad and use [Ctrl-C] to copy it, and then move to your module and use [Ctrl-V] to paste. This is particularly useful if you have code (global variables, constants, user defined types, and declare statements) that needs to be added to the declarations section of a module.

Exporting to a File

Using the [File] option, the exported code is stored in the text file you specify.

If you are using Visual Basic, to add the file to your project, from the Visual Basic menu select Project, Add File, and select the file you exported from Total Visual SourceBook.

If you are using a VBA host such as Access or Word, open up the VBE. Select File, Import File and select the file you exported from Total Visual SourceBook. Press the [Add] button in the Add File dialog, and the file is added to your project.

Exporting to Your Project

Using the [Project] option, the exported code is placed directly into your VB/VBA project.

There are two options available when exporting to a project.

•	Insert New Object into Project
Create a new object containing the exported code.

•	Append To Existing Object
Place the exported code into an existing object. This option is only available for modules and procedures.

Export To Project Form

Save in

If you are using Visual Basic, it is possible to have more than one Project open at a time in a Project Group. If you have a Visual Basic Group containing more than one project, this combo box allows you to specify the project.

See Getting Code into Your Project and Exporting Code for more information.


Printing Code

To print the current procedure, press the [image] button on the toolbar or select File, Print from the menu. This feature displays the Print dialog.

Print Dialog

The Print dialog lets you specify any of three items to print:

•	Code
Print the code tab displayed in the Information Window

•	Notes
Print the notes tab displayed in the Information Window

•	Example
Print the example tab displayed in the Information Window

Each of these items is printed on a separate page.


Finding Code with the Search Tool

With the Treeview, much of the code in Total Visual SourceBook can easily be located by category. You may, however, still have trouble finding code in the categories provided. Maybe the code is not in the category you expect, or maybe you can't find it in any category.

Rather than manually searching each topic, category, class, module, and procedure, use the Code Explorer's powerful Search Tool.

The Search Tool locates code based on the criteria you specify. Press the [image] [Search] button on the toolbar (or select Tools, Search from the menu) to bring up the Search Dialog.

The Search Dialog is divided into four sections:

•	Search Phrase

•	Search Category

•	Search Options

•	Additional Filters for User Code

The code that the Search tool looks through depends on your current view in the Code Explorer. If you are viewing FMS Code only, the Search Tool only searches FMS Code. If you are viewing both FMS Code and User Code, all the code in the Code Group is searched.

Search Dialog

More:

Specifying the Search Phrase

Selecting the Topic and Category to Search

Setting Search Options

Specifying Additional Filters for User Code

Executing the Search

Using the Search Results


Specifying the Search Phrase

In the drop down combo box at the top of the form, enter the word or phrase to find. This can be a single word, such as "table" or it can be a phrase such as "days in a month." The capitalization of your search words does not matter; the search engine performs case-insensitive searches.

Total Visual SourceBook maintains a history of the words and phrases for which you've searched. You can choose from a list of previously searched criteria from the combo box.

Boolean Operators

You can include Boolean operators such as AND, OR, and NOT. For example, to find each match with the word "day" and the word "month," the following search string would be entered "day AND month". The search phrase can also include parentheses. For example, "day AND (month OR year)" has a different meaning than "(day AND month) OR year".

Quotes around Phrases

If you want to search for multi-word phrases, use quotes around them. For example, if you type the phrase Jet Engine without quotes around it, AND is assumed and all the items with the word "Jet" and "Engine" are retrieved.

More Information

The following sections contain further information on the search tool:

Finding Code with the Search Tool

Selecting the Topic and Category to Search

Setting Search Options

Specifying Additional Filters for User Code

Executing the Search

Using the Search Results


Selecting the Topic and Category to Search

You can specify to search against all the topics and categories or just a specific one. Select the category desired from the combo box.

More Information

The following sections contain further information on the search tool:

Finding Code with the Search Tool

Specifying the Search Phrase

Setting Search Options

Specifying Additional Filters for User Code

Executing the Search

Using the Search Results


Setting Search Options

There are several options available in the Search Dialog that allow you to fine-tune how the search operates.

Find Whole Words Only

If this option is selected, only matching words are located.

In Addition to the Item Name, Search in

The item name is always searched for a match. These additional items can also be searched:

•	Description
The summary text for each item. This is the one line description at the beginning of the Notes pane.

•	Code
All the text in the code pane, including comments.

•	Example
All the text in the Example pane.

More Information

The following sections contain further information on the search tool:

Finding Code with the Search Tool

Specifying the Search Phrase

Selecting the Topic and Category to Search

Specifying Additional Filters for User Code

Executing the Search

Using the Search Results


Specifying Additional Filters for User Code

In addition to the standard search options, there are options that apply only to User Code.

Note: Since the Additional Filters are for searching user procedures, these options are disabled (grayed out) when you run the Search Tool while the Code Explorer is only showing FMS Code. If you want to search user code, change the Code Explorer view to display user code or both FMS and user code.

Search in User Notes

Selecting this option searches User Notes for matching words.

Created by

This option allows you to search by the person who added the procedure. Select the name from the drop down list box.

Modified by

This option allows you to search by the name of the last user who modified the procedure. Select the name from the drop down list box.

Creation date

This option allows you to search by the date the user-defined procedure was added to Total Visual SourceBook.

Modification date

This option allows you to search by the date the user-defined procedure was last modified.

More Information

The following sections contain further information on the search tool:

Finding Code with the Search Tool

Specifying the Search Phrase

Selecting the Topic and Category to Search

Setting Search Options

Executing the Search

Using the Search Results


Executing the Search

Once the options are specified, press [Search] to conduct the search. In a moment the search is complete and results are displayed for you to select.

More Information

The following sections contain further information on the search tool:

Finding Code with the Search Tool

Specifying the Search Phrase

Selecting the Topic and Category to Search

Setting Search Options

Specifying Additional Filters for User Code

Using the Search Results


Using the Search Results

The Search Results tab displays all the procedures matching the criteria you entered in the Search Dialog. The top of the tab displays the search criteria you specified.

Search Results Tab

Use the arrow keys and scroll bars to navigate through the results. You may use the mouse to adjust the column widths of the displayed information. Double-click on the divider line between two columns in the column header, and the display automatically resizes to fit the widest value in the column.

The columns displayed are:

•	Topic – Topic of the matching item

•	Category – Category of the matching item

•	Item – Name of the matching item

•	Description – Description of the matching item

Click on an item in the list and the Treeview jumps to it. You can also click on any column heading to sort the list.

More Information

The following sections contain further information on the search tool:

Finding Code with the Search Tool

Specifying the Search Phrase

Selecting the Topic and Category to Search

Setting Search Options

Specifying Additional Filters for User Code

Executing the Search


Using Bookmarks

Total Visual SourceBook provides a powerful Bookmark feature to let you flag code for easy retrieval. Add bookmarks to the code you commonly use so they appear in the Bookmarks tab. This eliminates the need to search among the categories or the 1600+ built-in procedures and your procedures.

Bookmarks Tab

Creating a Bookmark

Adding a bookmark is simple. Select the item to bookmark and click on the [image] [New Bookmark] icon on the toolbar. You can also select Edit, New Bookmark from the menu, or use the right-button mouse menu. The New Bookmark Form appears:

New Bookmark Form

Enter your own bookmark name (by default it is the selected object's name) and any notes. When you press [OK], the Bookmark is added to your Bookmarks tab.

Note: In the Note field, use [Ctrl-Enter] to create new lines.

Navigation and Display

While viewing the Bookmark Tab, you can use the arrow keys and scroll bars to navigate through the bookmarks.

Jump to the Bookmark's Code

Click on a bookmark and the Treeview jumps to it.

Adjust the Bookmark List and Display

Use the mouse to adjust the column widths. Clicking on the column heading sorts the bookmarks on that field.

Right Click Popup Menu

Right-click the bookmark list for a context sensitive menu:

Bookmarks popup menu

Editing a Bookmark

This option allows you to edit a bookmark. You can change the name or note.

Edit Bookmark Form

Deleting a Bookmark

Choosing this deletes the selected bookmark.

Delete Bookmark Confirmation

Multi-User Issues

Bookmarks are saved based on user name. In a shared environment, you only see your bookmarks. For information on how to re-assign bookmarks, see  User Name Replace.


Setting Options

You can specify a variety of settings to control how the Code Explorer behaves, and how exported functions are formatted. To set options, select Tools, Options from the menu.

More:

Syntax Highlighting Options

Export Options

Other Options

Code Group Options


Syntax Highlighting Options

Use the Syntax Highlighting options to customize the display of code. The window on the right displays a preview of your selections. These selections are also used for printing.

Syntax Highlighting Tab of the Options Form

Enabled

Check this option to turn syntax highlighting on or off. If this option is not checked, syntax highlighting is disabled, but background and font selections are still applied to your code.

Background

This specifies the background color used to display code.

Code Font

This selection specifies the font used to display code. The default value is Courier New 10 point. For readability, it is recommended that you use a monospaced font. Proportional fonts make code indentation and alignment difficult to see.

Comment Color

This setting specifies the color for comments.

Identifier Color

This setting specifies the color for identifiers. Identifiers are procedure names, variables, and constants.

Keyword Color

This setting specifies the color for Visual Basic keywords.

Normal Color

This setting specifies the color for normal characters. Normal characters are those that are not identifiers, comments, or keywords, and include items such as numbers, strings, and mathematical symbols.

Restore Defaults

This button restores the default font and colors used by Total Visual SourceBook. If you set font and color options that are not optimal, use this feature to reset reasonable values.

More Information

For more information on the available options, see  Setting Options.


Export Options

The options on the Export tab control how code is formatted when it is exported from Total Visual SourceBook. The window on the right displays a preview of your selections.

Export Tab of the Options Form

Include Dependencies when Applicable

Some of the code stored in modules requires other code. This requirement is called a dependency and means that a procedure requires another procedure in order to work correctly. When you export code, Total Visual SourceBook determines if the code you selected is dependent on any other procedures, and shows you this information in the Export Dialog.

Normally, you should include dependent procedures to ensure the correct functionality. However, if you want to manage dependencies on your own, un-check the [Include Dependencies] check box. This option controls the default state of the [Include Dependencies] option when you invoke the Export dialog. You can, of course, override this setting's value each time you use the Export dialog.

Tab Width

This option specifies the number of spaces for each indentation level. The default value is two, but you can change it to a value you prefer. This setting does not affect the code you add, only the FMS code.

Default Suffix for User Code

This option specifies the default extension when performing a Save As operation. If you would like the procedures to have a different suffix or no suffix at all, specify the default suffix here. When you actually perform a Save As, you may still choose a different extension. This is simply the default extension.

More Information

For more information on the available options, see  Setting Options.


Other Options

Other Tab of the Options Form

Save Code Explorer Window Size on Close

You can resize and position the Code Explorer window. Check this option to have Total Visual SourceBook save its size and position. If this option is turned on, the next time you start the program, these values are restored.

Save Procedure Position on Close

Check this option to have Total Visual SourceBook remember the last procedure displayed.

Fonts

For ease of readability on a wide variety of monitors and screen resolutions, Total Visual SourceBook lets you customize the font name and size of your choice. The fonts that can be customized in Total Visual SourceBook are:

•	Treeview – Main Code Explorer Treeview

•	User Notes – User Notes

•	Search Results – List of search results

•	Bookmarks– List of bookmarks

The font for User Notes is also used when printing.

Note that you can also set the font for the Code display. This option is available on the Syntax Highlighting tab of the Options dialog. See Syntax Highlighting Options for more information.

Automatically Update Notes with Name and Date

Check this option to have Total Visual SourceBook automatically update the Notes field each time an item is created or edited. This setting specifies the default behavior. It can be overridden when editing the code.

User Code is Read Only by Default

Check this option to set user code to Read Only. This setting specifies the default behavior when code is added and can be overridden.

Treeview Options

You may specify how the category and procedure information is displayed in the Treeview. You may select among the following settings:

•	Text Only

•	Picture and Text

•	Plus/Minus and Text

•	Plus/Minus, Picture, and Text

•	Tree lines And Text

•	Tree lines, Picture, and Text

•	Tree lines, Plus/Minus And Text

•	Tree lines, Plus/Minus, Picture, and Text

More Information

For more information on the available options, see  Setting Options.


Code Group Options

Total Visual SourceBook supports the ability to view different groups of code stored in different locations. This is done through the use of Code Groups. A Code Group consists of the database containing FMS source code, and the database containing the code that you and your team members add to the product. You can change the Code Group that Total Visual SourceBook looks at through this tab on the options dialog. For more information on creating and using Code Groups, see  Program and Code Groups.

To change the Code Group, press the Code Group tab on the Options dialog. The following form appears:

Group Tab of the Options Form

There are two locations that you can specify. The first entry, for the FMS Code database, indicates the location of the database containing the built-in FMS code. This file is named TVSBIC90.MDB.

The second entry, for the User Code database, indicates the location of the database containing the code you or your team members have added to the product through the Code Repository features. This file is named TVSBUC90.MDB.

Type in the appropriate paths, or press the [Browse] button to search for the directory. Note that you do not specify a file, only the directories where the databases are located. When your selection is complete, press the [OK] button to make the change. After a few moments, Total Visual SourceBook updates your display to show the contents of the new Code Group.

If you select a Code Group that is shared by other Total Visual SourceBook developers, you must have a licensed copy of the program installed with a unique serial number. Two developers cannot join the same code group if they have installations of Total Visual SourceBook on their computers that use the same serial number.

Note that you can only join a Code Group that was created by Total Visual SourceBook. You cannot join a Code Group created by other FMS products, or earlier or later versions of FMS products.

More Information

For more information on the available options, see  Setting Options.


Administrative Features

Total Visual SourceBook offers several functions that make it easy to perform standard administrative functions.

More:

Compact Database

User Name Replace


Compact Database

Total Visual SourceBook stores its code and other configuration information in Microsoft Access/Jet Engine database files. Just like other Access/Jet databases, these need to be periodically repaired and compacted to maintain integrity and efficiency. You should run the Compact process if you add or delete a large number of user-written procedures. The Repair operation is automatically performed if necessary.

Note: You should always perform a backup of your databases prior to compacting and/or repairing them. You can do this simply by copying the databases to another location, or by ensuring that the files are part of a daily backup routine. You may also want to consider our Total Visual Agent program that automates database repair, compact, and backup on a regular schedule. For more information, visit our web site at www.fmsinc.com.

Select the Tools, Compact menu item in Total Visual SourceBook to begin the compact operation. After confirming that you want to perform the operation, it begins. A status bar shows you the progress of the operation.

For more information, see  Administrative Features.


User Name Replace

When a new procedure is created, the name of the author is stored with the procedure. From time to time you may find it necessary to re-assign the procedure to another user. Perhaps the original name was entered in error, or the author of the code no longer works for the organization. The same concept applies to Bookmarks. Bookmarks are stored by user name. You can select Tools, User Name Replace from the menu to re-assign procedures and bookmarks.

User Name Replace Dialog

The list box on the top displays all the developers who added procedures or bookmarks to the Total Visual SourceBook Code Group. Select the entry that matches the name you wish to change, type the name of the new user in the text box, and press [Update].

Total Visual SourceBook runs a mass update of all user-written procedures and bookmarks to change the name. After making the changes the updated list of users is displayed.

For more information, see  Administrative Features.


Code Repository Overview

The code repository lets you store your own source code in Total Visual SourceBook. The code can be from your own work, information you find, or copies and modifications of the built-in code in Total Visual SourceBook. The purpose of the Code Repository is to make your development efforts easier:

•	Stop hunting for code in old projects.

•	Know where the latest version of your code is stored.

•	Eliminate wasted time rewriting lost code.

By keeping your module code with the Total Visual SourceBook code, you have a single place for all your code. You can:

•	Add code to any existing category, class, or module.

•	Create your own category, class, or module.

•	Add notes to your code.

•	Use the Code Explorer to find and view your code.

•	Use the Search Tool to locate your code.

•	Add bookmarks to your code.

•	Easily share code with others using the Source Code Exchange feature to package code for distribution.

The Code Repository is multi-user ready and can be shared among multiple developers. This lets the senior developers share their code among the team and not get pestered by repeated requests for their code. The person adding the code can also designate whether other developers have the right to modify or just view it to prevent the new hire from modifying their code.

More information

The following sections provide more information on the Code Repository:

Importance of Backups

Multi-User Issues

System-Maintained Information

Adding New Items

Importing Code

Saving Classes, Modules, and Procedures

Editing Items

Deleting Code


Importance of Backups

If you use Total Visual SourceBook to manage your code, you must make regular backups of your code.

To back up your code, use your current backup software to save the User Code database. The database file is named TVSBUC90.MDB. Remember that Total Visual SourceBook allows you to have multiple copies of the User Code database, so be sure to create backup copies of all the databases you use.

If you have multiple User Code databases, you must back up each one. For example, you may have installed Total Visual SourceBook both on your local machine and on a shared drive. In such cases, a User Code database exists on your local machine and on the drive where you installed the product for shared use. This scenario requires you to include both database files (the User Code database on your local machine and the shared User Code database on the shared drive) in your backup plan.

The User Code database file is a Microsoft Jet 3.5 database file, and can be archived with any backup software available for Windows. However, do not attempt to backup the file while other developers are using Total Visual SourceBook. Ensure all developers have closed the program before attempting to make a backup.

The frequency with which you make backups is dictated by the amount of code you store in the Code Repository and how often it is updated. The bottom line is that your code is invaluable. Regardless of the tool you use to manage it, you absolutely need to have backups.

More information

The following sections provide more information on the Code Repository:

Importance of Backups

Multi-User Issues

System-Maintained Information

Adding New Items

Importing Code

Saving Classes, Modules, and Procedures

Editing Items

Deleting Code


Multi-User Issues

Total Visual SourceBook allows you to work in a shared environment where you use the same Code Group as other developers. This multi-user capability makes it easy to share the code developed and maintained by your development team, and allows you to make your code accessible to other developers.

The Code Explorer and Code Repository support multi-user access without resorting to complex locking schemes. In other words, the program does not prevent you from making changes based on record locks, because locks are never placed. The program, however, does notify you if you attempt to save edits to an item that changed between the time you opened the item for editing and when you attempt to save it.

More:

Editing Conflicts

Minimizing Contention Issues

Refreshing the Treeview

Marking Code as Read Only


Editing Conflicts

If you select a procedure, and select Edit, the data appears in the Edit Procedure/Member dialog. This data is the data in the shared Code Group database at that moment. You can then make and save your changes. However, if another developer edited and saved the same procedure before you saved yours, you could wipe out their changes without realizing it. When you press the [OK] button, Total Visual SourceBook checks to see if the data changed since you started editing. If it detects a change, a dialog appears. You can then choose to overwrite the other developer's changes or cancel.

If this situation arises, you should copy and paste your changes to a text file for temporary storage. Then determine who made what changes. More importantly, you need to know why someone else is modifying the code you are working on.

More:

Multi-User Issues

Minimizing Contention Issues

Refreshing the Treeview

Marking Code as Read Only


Minimizing Contention Issues

There are ways to minimize Editing Conflicts:

•	Mark your code as Read Only. Other developers cannot modify code that is set to Read Only by you.

•	Make a copy of the code. While you normally don't want your Code Repository to contain multiple versions of the same code, there are cases where this is beneficial. For example, if you plan to make many changes to an existing class or module, it may be better to leave the original version intact and create a new "enhanced" version. This lets you keep the original version for archival purposes, and to support projects where the original version is in use. Of course, tracking multiple versions of code can be difficult, so be sure to keep detailed comments in the Notes field and the code itself.

More:

Multi-User Issues

Editing Conflicts

Refreshing the Treeview

Marking Code as Read Only


Refreshing the Treeview

For performance and usability reasons, the Code Explorer does not automatically refresh the Treeview window as soon as other users make changes. If the Treeview were to update with every change, your display could constantly repaint. Additionally, all other operations in the Code Explorer would slow down as the program continually re-queried the database.

To see the latest view of items in a shared Code Group, press the Refresh button on the toolbar or press [F5].

More:

Multi-User Issues

Editing Conflicts

Minimizing Contention Issues

Marking Code as Read Only


Marking Code as Read Only

When you add a new category, class/module, or code into the Code Repository, you are the owner and can decide whether other developers can modify it by specifying its "Read Only" setting. You can specify the Read Only status at the individual procedure level, or at a higher level like the category or class/module. The setting is hierarchical. These are the effects of the Read Only setting at each level:

•	Procedure/Property
If a procedure/property is set to Read Only, only the person who added it can edit or delete it. If Read Only is not set on the procedure, the rights depend on the Read Only setting of the procedure's class/module.

•	Class/Module
If a class/module is set to Read Only, only the person who created it can modify its information (name and notes) and its members (properties and procedures). No other developers can add, delete, or edit its members, regardless of the member's Read Only setting. The Read Only setting at the Class/Module level takes precedence over the individual member settings.

•	Category
If a category is set to Read Only, only the person who created the category can modify its name or notes. That person is also the only person who can modify its contents including classes, modules, and procedures.

Basically, if you are not the owner, you can only edit or delete procedures that are not set to Read Only, and are not in a class/module and category set to Read Only. Similarly, you can only add procedures to categories and classes/modules that are not set to Read Only.

Finally, you can only delete categories or classes/modules containing objects for which you have rights. For instance, if you want to delete an entire category, but one of its modules or procedures is set to Read Only by someone else, the Delete is not allowed and no items are deleted.

The Read Only option is set when the category, class/module, or procedure is added. You can change it later by editing it.

More:

Multi-User Issues

Editing Conflicts

Minimizing Contention Issues

Refreshing the Treeview


System-Maintained Information

To assist with managing your source code, Total Visual SourceBook automatically tracks the following information:

•	Created By (author name)
When you add new code, your user name is stored as the code's author. This is based on how you identified yourself to the program when you logged in (see Running the Code Explorer).

•	Created Date
The date and time the code was created.

•	Modified By
The name of the person who modified the code.

•	Modified Date
The date and time the code was modified.

•	Dependencies
User dependencies are automatically maintained by Total Visual SourceBook. Any user procedure in a module that has a declarations section is automatically flagged as dependent on the declarations. No dependencies are maintained within classes because a class is defined as a complete unit—its dependencies are implied. For user code, Total Visual SourceBook automatically creates a dependency for modules that have a declarations section. You cannot alter this dependency or add any custom dependencies to user code.

With this information, you can use the Search Tool to locate your procedures.

More information

The following sections provide more information on the Code Repository:

Importance of Backups

Multi-User Issues

Adding New Items

Importing Code

Saving Classes, Modules, and Procedures

Editing Items

Deleting Code


Adding New Items

Adding a New Topic

Adding a New Category

Adding a New Class or Module

Adding a New Member or Procedure


Adding a New Topic

The highest level of organization in the Total Visual SourceBook is the Topic level. You can add code to an existing topic or create your own. To add a new topic, open the New Topic form by pressing the [image] [New Topic] button on the toolbar or by selecting File, New Topic from the menu:

New Topic Form

Name, Description, and Notes

Enter the name of the new topic. All topic names must be unique. If you enter a topic name that conflicts with an existing topic, Total Visual SourceBook displays a message informing you of the conflict. If this happens, choose a different name.

Next, type a description for the new topic. This description should be brief enough to be understood quickly when viewed in the Code Explorer.

The Notes field is provided for notes and comments for your topic. The contents of this field can be used as criteria when performing a search.

The Notes are stored in rich text format (RTF). They can include custom fonts, embedded objects, and other formatting features. Press the [Open Editor] button to edit the RTF notes in a full-featured RTF editor. For more information on the editing features of Total Visual SourceBook, see  Code Editor.

Other Options

Two other options are available to allow you to customize your new topic entry.

•	Update Notes with Your Name and Today's Date
Check this option and Total Visual SourceBook automatically adds information to the Notes, including your user name and the current date and time. This is particularly useful if people change the topic information over time. See System-Maintained Information for more information.

•	Read Only
Check this option if you do not want others to edit or delete this topic. Enabling the Read Only setting only allows you (the owner of the topic) to make changes or delete it. This setting also prevents people from modifying any of the topic's contents. See Marking Code as Read Only for more information.

Saving Your New Topic

Once you have supplied all the information about your new topic, press [OK] to save or [Cancel] to discard your changes.

More Information

See Adding New Items for information on adding items to the Code Repository, and Importing Code for information on importing code from your VBA projects.

See Code Repository Overview for more information on the Code Repository.


Adding a New Category

You can add code to an existing category or create your own. To add a new category, open the New Category form by pressing the [image] [New Category] button on the Code Explorer toolbar or by selecting File, New Category from the menu:

New Category Form

Name, Description, and Notes

Enter the name of the new category. All category names must be unique within a given topic. If you enter a category name that conflicts with an existing category, Total Visual SourceBook displays a message informing you of the conflict. If this happens, choose a different name.

Next, type a description for the new category. This description should be brief enough to be understood quickly when viewed in the Code Explorer. This field can be used in the Search Tool, so enter key words or other phrases to make it easier to find. This field accepts up to 255 characters.

The Notes field is provided for notes and comments for your category. This can include documentation and comments. The contents of this field can be used as criteria when performing a search.

The Notes are stored in rich text format (RTF). They can include custom fonts, embedded objects, and other formatting features. Press the [Open Editor] button to edit the RTF notes in a full-featured RTF editor. For more information on the editing features of Total Visual SourceBook, see  Code Editor.

Other Options

Two other options are available for customizing your new category entry.

•	Update Notes with Your Name and Today's Date
Check this option and Total Visual SourceBook automatically adds information to the Notes, including your user name and the current date and time. This is particularly useful if people change the category information over time. See System-Maintained Information for more information.

•	Read Only
Check this option if you do not want your colleagues to edit or delete this category. Enabling the Read Only setting only allows you (the owner of the category) to make changes or delete it. This setting also prevents people from modifying any of the category's contents. See Marking Code as Read Only for more information.

Saving Your New Category

Once you have supplied all the information about your new category, press [OK] to save or [Cancel] to discard your changes.

More Information

See Adding New Items for information on adding items to the Code Repository, and Importing Code for information on importing code from your VBA projects.

See Code Repository Overview for more information on the Code Repository.


Adding a New Class or Module

You can add a class or module to a category. Select the category, then press the [image] [New Class or Module] button on the Code Explorer toolbar or select File, New Class/Module from the menu. After a moment, this form appears:

New Class or Module Form

Entering Basic Information

Follow these steps to enter the basic information about your new class or module.

1.	Select a name for your new module, class, or snippet module. Keep the following in mind when you create new classes or modules:

•	Each class and module name must be unique within a category.

•	Although Total Visual SourceBook does not enforce rules regarding naming for your entries, you should follow the specific rules regarding the length of names and valid characters. Total Visual SourceBook uses the convention of prefixing module names with "mod" and class names with "C"— we suggest using this convention for consistency.

2.	Specify whether your new entry is a module, a class, or contains "code snippets." Do this by selecting either "Module," "Class," or "Snippets" in the Module Type option group. There is really no functional difference between a regular module and a "snippet" module, except that the icon shown in the treeview is different. We suggest using only fully formed and tested procedures in standard modules. Use snippet modules for other code examples and sections that can't run on their own. Many of the "example" modules that ship with Total Visual SourceBook are stored in "snippet" modules because the code they contain serves as an example of a technique, and cannot be run directly.

3.	Type a description for the new item. This description should be brief enough to be understood quickly when viewed in the Code Explorer. Since the Search Tool can search on this field, enter keywords or other phrases to make it easier to find. This field accepts up to 255 characters.

4.	Enter descriptive Notes about your class/module. This can include documentation and comments. The contents of this field can be used as criteria when performing a search.

The Notes are stored in rich text format (RTF). They can include custom fonts, embedded objects, and other formatting features. Press the [Open Editor] button to edit the RTF notes in a full-featured RTF editor. For more information on the editing features of Total Visual SourceBook, see  Code Editor.

5.	Under the Example tab, you can add code to show how to use your new module or class.

Setting Options

The following options let you control the settings of your new module or class:

•	Update Notes with Your Name and Today's Date
Check this option for Total Visual SourceBook to automatically add information to the Notes, including your user name and the current date and time. This is particularly useful if people change the text over time. See System-Maintained Information for more information.

•	Read Only
Check this option if you do not want others to edit or delete this class/module. Enabling the Read Only setting only allows you (the owner of the class/module) to make changes or delete it, provided the category is not set to Read Only by someone else. This setting also prevents people from modifying any of the properties or procedures contained within the class/module. See Marking Code as Read Only for more information.

Saving Your New Class or Module

Once you have supplied all the information about your new item, press [OK] to save or [Cancel] to discard your changes.

More Information

See Adding New Items for information on adding items to the Code Repository, and Importing Code for information on importing code from your VBA projects.

See Code Repository Overview for more information on the Code Repository.


Adding a New Member or Procedure

To add a new member or procedure to an existing class or module, first select the class or module in the Treeview. Next, press the [image] [New Member or Procedure] button on the Code Explorer toolbar or select File, New Member/Procedure from the menu. After a moment, this form appears:

New Member or Procedure Form

Entering Basic Information

Follow these steps to enter the basic information about your new procedure or class member.

1.	Enter the name of the new item. Keep the following in mind when you create new procedures:

•	All names in a class or module must be unique. If your name conflicts with an existing procedure, Total Visual SourceBook displays a message informing you of the conflict. If this happens, choose a different name.

•	Although Total Visual SourceBook does not enforce rules regarding naming, VB and VBA have specific rules regarding the length of names and valid characters.

•	The name you assign to a new member or procedure is not tied to the actual code you enter into the Code Window. For example, you could create a procedure named "CloseFile" and then enter a procedure in the Code Window named "PurgeFile". Total Visual SourceBook does not interpret the code you enter in the Code Window and does not care if the procedure name in the Procedure Name field matches the definition of the procedure in the Code Window. This allows you to have multiple versions of the same procedure name stored under different names in the Code Explorer Treeview.

2.	Check the "Declaration" checkbox to mark this procedure as a declaration. Total Visual SourceBook automatically creates a dependency for every procedure in the module to the declaration. This option is not available if a procedure in the same class or module is already marked as a declaration.

3.	Check the "Property" checkbox to mark this member as a property. This setting only affects the icon displayed in the Code Explorer Treeview. This option is only available if you are adding a member to a class.

4.	Type a description for the new procedure. This description should be brief enough to be understood quickly when viewed in the Code Explorer. Since the Search Tool may search on this field, enter keywords or other phrases to make it easier to find. The description field accepts up to 255 characters.

5.	The Notes field is provided for user notes. This can include documentation and comments. The Search Tool can also analyze this field.

The Notes are stored in rich text format (RTF). They can include custom fonts, embedded objects, and other formatting features. Press the [Open Editor] button to edit the RTF notes in a full-featured RTF editor. For more information on the editing features of Total Visual SourceBook, see  Code Editor.

Supplying the Code

The most important part of this dialog is the code itself. Use the Code textbox to enter the actual code for the procedure or class member. You can either enter the code by hand, or paste it in from the clipboard.

Total Visual SourceBook does not validate or compile the text you enter into the Code textbox. Although it expects you to enter valid code, there is nothing to stop you from pasting in a text file, an email message, or whatever else you may have. However, to use Total Visual SourceBook in the most effective way, put code into the Code text box in the same format that Total Visual SourceBook uses for the built-in code:

•	In general, you should store only one procedure's code per procedure/member item. An exception is when you are pasting in a property procedure, in which case you should place all the pieces (Let, Get, Set) for that property.

•	Avoid blank lines at the beginning and end of your procedure's code. This makes the Export tool work correctly when pasting the code into your VB project.

•	Paste in tested code. You should adopt the practice of never typing into the Code textbox. Instead, write and test the procedure, then copy the code from the VB/VBA editor window, and paste it into the Code textbox. This eliminates the formatting and typing errors that can occur from manually editing.

Setting Options

The following options allow you to control the settings for your new procedure or class member.

•	Update Notes with Your Name and Today's Date
Check this option and Total Visual SourceBook automatically adds information to the Notes with your user name, and the current date and time. This is particularly useful if people change the property/procedure information over time. See System-Maintained Information for more information.

•	Read Only
Check this option if you do not want others to edit or delete this item. Enabling the Read Only setting only allows you (the owner) to make changes or delete it provided the category and class/module are not set to Read Only by someone else. This prevents new hires from modifying or deleting your code. See Marking Code as Read Only for more information.

Saving Your New Procedure

Once you supply all the information, press [OK] to save or [Cancel] to discard your changes.

More Information

See Adding New Items for information on adding items to the Code Repository, and Importing Code for information on importing code from your VBA projects.

See Code Repository Overview for more information on the Code Repository.


Importing Code

Rather than manually entering each procedure or property of a class or module (see Adding New Items), you can import from a file or Visual Basic Project directly into the Total Visual SourceBook Repository. In this context, "Visual Basic Project" includes Visual Basic 6.0 and any code modules or classes that exist in Office 2000/XP documents (such as Access databases or Excel workbooks). The import feature imports a whole class or module at once—it does not import individual procedures.

Note: For information on importing code from another source code library program or a Source Code Exchange (SCE) file, see  Source Code Exchange. See Code Repository Overview for more information on the Code Repository.

To import an item, select File, Import, Text File/Current Project from the menu. The Import Dialog appears:

Import Dialog

Specify the Source

First you must specify the source of the item you are importing. This can be either a file on a local or shared drive, or an object in your current VBA Project.

File

This can be any file, but only code information from the file is imported. Please see How Non-Code Data Is Imported   for more information.

Project

Specifying "Project" as the source tells Total Visual SourceBook that you want to import a module from your currently open Visual Basic Project. Note that in order to import an object from a Visual Basic Project, you must have Total Visual SourceBook open as an add-in through Visual Basic or your Office 2000/XP application.

Clicking the […] button displays this form.

Import From Project Form

All Project items that contain code are shown, but only code information from an object is imported. See How Non-Code Data Is Imported  for more information.

Specify the Destination

Next, specify the topic and category to import into, and the name of the item. The name is automatically filled in from the file or object name. Specify the destination type of object: class or module. This does not depend on the type of object you are importing.

More:

How Non-Code Data Is Imported


How Non-Code Data Is Imported

The Importing Code operation does not store any data from a source object that is non-code. Non-code data includes form layout information, designer attributes, and module and class attribute information. This information is discarded by the Import operation. This behavior is important to note if you plan on importing class modules into Total Visual SourceBook and the modules contain extended information about default properties, etc. This information needs to be manually recreated when you export that class back into a VB/VBA project.


Saving Classes, Modules, and Procedures

Save As Class/Module

You can save an existing class or module under a new name in the same category, then edit and change the code to suit your needs. You can do this on any class or module, whether it is FMS code, user code, or even code marked as Read Only.

Select the module or class in the Total Visual SourceBook Code Explorer Treeview. Press the [image] [Save As] toolbar button or select File, Save As from the Total Visual SourceBook Code Explorer menu. The following dialog appears:

Saving a Class or Module with a New Name

Class or Module Name

By default the name is the original name with a trailing suffix of the value specified on the Options form.

Category to Save In

You can specify the topic and category in which to save the item. By default this is the current category.

Other Options

All other options and entries on this dialog are the same as when you create a new class or module. See Adding a New Class or Module for more information.

Saving or Canceling your Changes

Press [OK] to save the new item, or [Cancel] to return to the Code Explorer form without adding the new item.

Save As Member or Procedure

You can save an existing procedure under a new name in the same class/module, then edit and change the code to suit your needs. Save As can be used on any procedure, whether it is FMS code, user code, or even code marked as Read Only.

Select the procedure in the Total Visual SourceBook Code Explorer Treeview. Press the [image] [Save As] toolbar button or select File, Save As from the Total Visual SourceBook Code Explorer menu. The following dialog appears:

Saving a Procedure with a New Name

Procedure Name

By default the suggested name is the original name with a trailing suffix consisting of the value specified on the Options form.

The same rules for names and conflicts that applied to creating a new procedure also apply when you use the Save As function. See Adding a New Member or Procedure  for more information.

Tab Width

This option specifies the number of spaces for each indentation level.

Other Options

All other options and entries on this dialog are the same as when you create a new procedure or class member.

Saving or Canceling your Changes

Press [OK] to save the new item, or [Cancel] to return to the Total Visual SourceBook Code Explorer form without adding the new item.

More information

The following sections provide more information on the Code Repository:

Importance of Backups

Multi-User Issues

System-Maintained Information

Adding New Items

Importing Code

Editing Items

Deleting Code


Editing Items

Editing a Topic

Editing a Category

Editing a Class or Module

Editing a Member or Procedure


Editing a Topic

You cannot edit the built-in FMS topics, but you can modify user topics if you created the topic or if it is not designated as Read Only. If you need to change the ownership of a topic after it is created, use the User Name Replace option.

Select the topic to edit from the Total Visual SourceBook Code Explorer Treeview. Press the [image] [Edit Topic] toolbar button or select Edit, Topic from the menu:

Edit Topic Form

Editing Topics

The options on this form are the same as those for the New Topic form.

Saving or Canceling your Changes

Press [OK] to save the changes to the topic, or [Cancel] to return to the Total Visual SourceBook Code Explorer form without saving your changes.

More Information

See Editing Items for more information.

See Code Repository Overview for more information on the Code Repository.


Editing a Category

You cannot edit the built-in FMS categories, but you can modify user categories if you created the category or if it is not designated as Read Only. If you need to change the ownership of a category after it is created, use the User Name Replace option.

Select the category to edit from the Total Visual SourceBook Code Explorer Treeview. Press the [image] [Edit Category] toolbar button or select Edit, Category from the menu:

Edit Category Form

Editing Categories

The options on this form are the same as those for the New Category form.

Saving or Canceling your Changes

Press [OK] to save the changes to the category, or [Cancel] to return to the Total Visual SourceBook Code Explorer form without saving your changes.

More Information

See Editing Items for more information.

See Code Repository Overview for more information on the Code Repository.


Editing a Class or Module

You can change user class or module items in the code repository if you created the class or module, or if the creator did not designate it as Read Only. See Setting Options for more information. If you need to change the ownership of a category after it is created, use the User Name Replace option.

Select the class or module you wish to edit from the Total Visual SourceBook Code Explorer Treeview. Press the [image] [Edit Class or Module] toolbar button or select Edit, Class or Module from the menu. The following form appears:

Edit Class or Module Form

You cannot edit the built-in FMS classes or modules. To modify an FMS class or module, use the Save As function to save the FMS procedure under another name.

Editing Items

The options on this form are the same as those for the New Class or Module form. See Adding a New Class or Module for more information.

Saving or Canceling your Changes

Press [OK] to save the changes to the procedure, or [Cancel] to return to the Total Visual SourceBook Code Explorer form without saving your changes.

More Information

See Editing Items for more information.

See Code Repository Overview for more information on the Code Repository.


Editing a Member or Procedure

You can change user code in the code repository if you created the procedure, or if the creator did not designate it as Read Only. See Setting Options for more information. If you need to change the ownership of a category after it is created, use the User Name Replace option.

Select the procedure you wish to edit from the Total Visual SourceBook Code Explorer Treeview. Press the [image] [Edit Member or Procedure] toolbar button or select Edit, Member/Procedure from the menu. This form appears:

Edit Member or Procedure Form

You cannot edit the built-in FMS procedures. To modify an FMS procedure, use the Save As function to save the FMS procedure under another name.

Editing Items

The options on this form are the same as those for the New Member or Procedure form. See Adding a New Member or Procedure  for more information.

Saving or Canceling your Changes

Press [OK] to save the changes to the procedure, or [Cancel] to return to the Code Explorer form without saving your changes.

More Information

See Editing Items for more information.

See Code Repository Overview for more information on the Code Repository.


Deleting Code

You cannot delete the FMS items, but you can delete user-items, provided that you are the creator or the creator has not marked the items as Read Only.

From the Total Visual SourceBook Code Explorer Treeview, select the category, class/module, or procedure to delete and press the [image] [Delete] button on the toolbar, or select File, Delete from the Code Explorer menu. You may also simply press the [Del] key when the selected item is highlighted. Items cannot be recovered once deleted.

More information

The following sections provide more information on the Code Repository:

Importance of Backups

Multi-User Issues

System-Maintained Information

Adding New Items

Importing Code

Saving Classes, Modules, and Procedures

Editing Items


About Source Code Exchange

Total Visual SourceBook Source Code Exchange files (SCEs) provide an easy way to share or publish your code. SCEs are packages of code and notes extracted from a Total Visual SourceBook user code database. Because Source Code Exchange handles replicating code and notes, you can use it to keep multiple versions of code in sync.

Use SCE files to:

•	Send updated code to offsite developers.

•	Share new techniques with your programming team.

•	Create subject-matter specific code routines for easy inclusion in a project.

•	Post your own code on the web.

In addition, Total Visual SourceBook code library updates are provided in the form of SCE files that you can obtain from our product support web site.

More Information

The following sections provide further information on importing data from SCE files and other code libraries:

About Source Code Exchange

Creating an SCE Package

Importing an SCE Package

Importing Data from Another Code Library


Creating an SCE Package

To create your own SCE file, start by selecting File, Create SCE File from the Total Visual SourceBook menu. This displays the SCE Export form:

SCE Export Form

All of the available user code is shown in the treeview list. The first step in creating the SCE file is to select the items you wish to export. To select an item for export, check the box next to its name in the treeview.

Note: You can only select an entire module or class. It is not possible to export only certain procedures or properties within a module or class. Only user-written modules can be exported, but both user and FMS-written topics and categories can be exported. The SCE file always contains the complete hierarchy of storage from Topic to Category to Module. This means that you can always import this SCE file into another copy of Total Visual SourceBook, even if the other copy does not have the same topics and categories as your system.

After selecting the items to add to the SCE file, press [Next] to display the next page of the SCE File Creation dialog:

SCE Export Descriptive Fields

On this page you can enter descriptive comments about the SCE file, including who created it, what it contains, and when it was created. This information is useful for finding the SCE file to import at a later time.

Use the Save As text box to specify the name and location where the SCE file will be created. Use the [Browse] button to use a common file dialog to browse to the location.

When you are ready to create the SCE, press the [Finish] button to display the confirmation message that the file was created:

SCE File Creation Confirmation

The SCE file is now created in the specified location, and is ready for you to distribute.

More Information

For general information about SCE files, see  About Source Code Exchange.

For information on importing an SCE package, see  Importing an SCE Package.

For information on importing data from other sources, see  Importing Data from Another Code Library.


Importing an SCE Package

To import a Source Code Exchange (SCE) from another user, select File, Load SCE File from the Total Visual SourceBook menu bar. The SCE import dialog is displayed:

Import SCE Dialog

Press the [Browse] button to locate the SCE file that you want to import. The information that was added when the SCE file was created appears on this form, and is helpful in determining what the SCE file contains.

The code contained in the SCE file is displayed in a hierarchical treeview list containing the Topic, Category, and Module information. You can select some or all of the code in the SCE file for import simply by checking the box beside the name of the item. Use the [Select All] button to select all items in the list, and the [Clear All] button to unselect all items.

After selecting the code to import, press the [Next] button, and the following form appears:

Import Conflicts Found

There may be conflicts between the names of the code you are importing and the items currently in the database. A list of possible conflicts is displayed in the lower portion of the screen. The name of the module and the nature of the conflict are shown in the first two columns.

To help Total Visual SourceBook determine how to resolve these naming conflicts, you must select one of the following options for each conflicting module:

•	Skip
Do not import the item.

•	Overwrite
Replace the same-named item in the database with the new item without making a backup.

•	Rename
Select a new name for the item when importing it into the database.

After resolving all naming conflicts with the SCE file, press the [Next] button to continue. To finalize the process, press the [Import] button.

More Information

For general information about SCE files, see  About Source Code Exchange.

For information on creating an SCE package, see  Creating an SCE Package.

For information on importing from other sources, see  Importing Data from Another Code Library.


Importing Data from Another Code Library

Total Visual SourceBook allows you to import data from the following code library programs:

•	Total Access SourceBook 2.0 for Microsoft Access 2.0

•	Total Access SourceBook 8.0 for Microsoft Access 95 and 97

•	Total VB SourceBook 5 for VB 5

•	Total VB SourceBook 6 for VB 5 and 6

•	Microsoft Office 2000 Developer Code Librarian

Starting the Import Process

NOTE: If you are importing code from a previous version of Total Access SourceBook (version 2.0 or 8.0), you must run the import on the same machine that has Total Access SourceBook installed. Because of the structure of the data in Total Access SourceBook 2.0 and 8.0, importing from a shared drive across a network will not work. For example, if your desktop machine has Total Access SourceBook 2.0 or 8.0 installed, and you run Total Visual SourceBook from your desktop machine, the import process will work correctly. If you have Total Access SourceBook 2.0 or 8.0 installed on another machine, and browse to that machine from the Total Visual SourceBook Import form, the import process will display an error message.

To start the process, select File, Import, Another Code Library from the program menu.

Select the Import Source

Import Code from Another Code Library

Select the product from which you wish to import and press the [Next] button.

Select Location

Pick the directory or file containing the data to import. If the previous version of the SourceBook product is installed, Total Visual SourceBook automatically searches your system registry to find where the data is stored. This path is then shown as the default location.

Note that if you are importing data from Microsoft Office 2000 Developer Code Librarian, you must specify the path of the converted file you made earlier (see Special Note for Microsoft Office 2000 Developer Code Librarian Users for more information).

Press [Browse] to search your hard drive or the network for the database containing the data to import. Once you specify the correct location, press [Next] to confirm the choice.

The next form gives details about the file you selected, including data type, location, and number of items to import. If the file is invalid or cannot be opened, an error message appears on this form. To resolve this, press [Back] and point to a valid file.

Confirm Selection

Press [Next] again to see a status message about the import. After the import is complete, the following form appears:

Code Imported Successfully

Once the code is imported, it is shown in the Total Visual SourceBook treeview under its own Topic and Category. If you wish to move the code to another location you can use "Save As" to save the code into a new location.

More:

Special Note for Microsoft Office 2000 Developer Code Librarian Users


Special Note for Microsoft Office 2000 Developer Code Librarian Users

The MOD Code Librarian stores its data in a password-protected Access 2000 (Jet 4.0) database. Because Total Visual SourceBook uses version 3.51 of the Microsoft Jet database, our program cannot directly open this file. To import data from the MOD Code Librarian, follow these steps before you attempt to import the data into Total Visual SourceBook.

NOTE: Total Visual SourceBook uses Jet 3.51 because it is sufficient for the functionality required, uses fewer files, and is much smaller than a similarly deployed Jet 4.0 application.

Step 1: Start Access 2000

Run Access 2000. If you do not have Access 2000 installed on the machine you are working on, you can follow these steps on another machine.

Step 2: Locate your MOD Code Librarian database

Find the CodeLib.mdb file that contains your MOD code. By default, this file is located in the directory where you installed the Microsoft Office Developer tools. The typical path is:

C:\Program Files\Microsoft Office\ODETools\V9

Step 3: Open the MOD Code Librarian database in Access 2000

In Access 2000, select File, Open and point to the database you located in Step 2 above. When prompted for a password, enter:

CodeLib

Note that the password is case-sensitive.

Step 4: Convert the database to a compatible format

Once the database is open, select Tools, Database Utilities, Convert Database, To Prior Access Database Version from the Access menu. The Access Save File dialog appears asking you where you want to save the converted copy of the database. Be sure to remember the name and path of your new database—you will need this information later in the process when you use Total Visual SourceBook to import the data.

Step 5: Finish the conversion and close Access

After saving your new file, close Access and return to Total Visual SourceBook. You now have a file from which Total Visual SourceBook can import.

More Information

For more information, see  Importing Data from Another Code Library.


Using the FMS Rich Text Editor

When you add your own code to Total Visual SourceBook, you can supply notes to describe it. Your notes can be plain text, or you can use Rich Text to add fonts, colors, bold face, italics, paragraph alignment, indentations, tabs, bullet points, etc. You can even add graphics, "live" hyperlinks, and OLE objects.

The built-in FMS Rich Text Editor gives you these features and works like other text editors such as WordPad or Microsoft Word. As such, this manual does not go into great detail on each feature of the editor or how to use a word processor. Instead, the main functions of the editor are described briefly. Use this chapter as a reference if you have questions about how to use a particular feature of the editor.

To launch the FMS Rich Text Editor press the [Open Editor] button on any of the Total Visual SourceBook forms where you can enter Notes.

More Information

The following sections provide further information about the Rich Text Editor:

Editor Components

File Menu Options

Edit Menu Options

Insert Menu Options

Format Menu Options

Tools Menu Options


Editor Components

The FMS Rich Text Editor consists of the following main components:

Editing Window

The editing window is where the user types and selects the text for the control:

Editing Window

Main Toolbar

The main toolbar provides shortcuts for several program operations, such as File Open, File Save, Print, and Spell Check. Spell Checking is only enabled if you have the Microsoft Office 2000 or XP Spell Checker installed.

Main Toolbar

Formatting Toolbar

The formatting toolbar provides shortcuts for several font formatting operations, such as font name, size, style, and color, as well as other formatting options such as paragraph alignment, bullets, and hyperlinks.

Formatting Toolbar

Paragraph Ruler

The paragraph ruler is used to set the indentation for a paragraph, as well as to specify tab stops.

Paragraph Ruler

The Formatting Toolbar and the Paragraph Ruler are visible or hidden depending on the settings of the View Menu:

View Menu

More Information

The following sections provide further information about the Rich Text Editor:

Using the FMS Rich Text Editor

File Menu Options

Edit Menu Options

Insert Menu Options

Format Menu Options

Tools Menu Options


File Menu Options

The File menu offers the following options:

Integrated Editor Menus

New… – Clears the contents of the current memo. This function is also available from the [image] button on the Main Toolbar.

Open…– Opens and loads an existing file containing Rich Text or standard text formats. This function is also available from the [image] button on the Main Toolbar.

Save – Saves the contents of the current memo to a file. This function is also available from the [image] button on the Main Toolbar.

Save As…– Saves the contents of the current memo to a new file.

Print – Prints the current contents, and allows you to specify the printer and number of copies desired. This function is also available from the [image] button on the Main Toolbar.

Print Preview– Displays each page as it will look when printed. This function is also available from the [image] button on the Main Toolbar.

Page Setup…– Sets the page options used for printing.

Send…– Sends a document using your default mail program.

Exit – Exits the FMS Rich Text Editor.

More Information

The following sections provide further information about the Rich Text Editor:

Using the FMS Rich Text Editor

Editor Components

Edit Menu Options

Insert Menu Options

Format Menu Options

Tools Menu Options


Edit Menu Options

The Edit menu offers the following options:

Edit Menus

Undo – Undoes the last action you performed, such as deleting a word or typing a letter. Press [Ctrl-Z] as the keyboard shortcut for this option. This function is also available from the [image] button on the Formatting Toolbar.

Redo – Reverses the action of the Undo command. Press [Ctrl-Y] as the keyboard shortcut for this option. This function is also available from the [image] button on the Formatting Toolbar.

Cut – Copies the selected text in the control to the Windows clipboard, and removes it from the document. Press [Ctrl-X] as the keyboard shortcut for this operation. This function is also available from the [image] button on the Formatting Toolbar.

Copy – Copies the selected text in the control to the Windows clipboard, but leaves it in the document. Press [Ctrl-C] as the keyboard shortcut for this operation. This function is also available from the [image] button on the Formatting Toolbar.

Paste – Pastes plain text or Rich Text into the current control at the current cursor location. You may have placed this text onto the clipboard by the FMS Rich Text Editor, or by another application such as Notepad or Microsoft Word. Press [Ctrl-V] as the keyboard shortcut for this operation. This function is also available from the [image] button on the Formatting Toolbar.

Paste Special… – Allows you to select the type of object to paste the contents of the clipboard as.

Clear – Removes the selected text. [Del] is the keyboard shortcut for this operation.

Select All – Selects and highlights all of the text in the editing window. [Ctrl-A] is the keyboard shortcut for this operation.

Find… – Displays the Find dialog to search the control for a particular word or phrase. [Ctrl-F] is the keyboard shortcut for this operation. The following dialog is displayed:

Find Dialog

Enter the text to search for in the "Find What" box. To find only cases where the whole word matches, check the "Match whole word only" box; to find only cases where the upper and lower case match your search string, check the "Match case" box. Press [Find Next] to find the next occurrence of the search string.

Find Next – Repeats the last operation selected with the Find dialog. [F3] is the keyboard shortcut for this operation.

Replace… – Displays the Replace dialog to search and replace a particular word or phrase. [Ctrl-H] is the keyboard shortcut for this operation. The following dialog is displayed:

Replace dialog

Enter the text to find in the "Find What" box. Enter the text to replace in the "Replace With" box. Press [Find Next] to locate the next occurrence of the search word. Press [Replace] to replace the current occurrence of the search word, or press [Replace All] to replace all occurrences of the search word. The "Match whole word only" and "Match case" check boxes work the same as those in the Find dialog.

Links… – Displays a list of all links in the document.

Object Properties – Displays the properties of the object.

Object… – Invokes and activates the currently selected object for in-place editing.

More Information

The following sections provide further information about the Rich Text Editor:

Using the FMS Rich Text Editor

Editor Components

File Menu Options

Insert Menu Options

Format Menu Options

Tools Menu Options


Insert Menu Options

The Insert menu offers the following options:

Insert Menu

Date and Time… – Invokes the Date and Time dialog, which allows you to select a date and time format to insert into the current document:

Date and Time Dialog

Select the type of date format you wish to use, and press the [OK] button to insert the value at the current insertion point.

File… – Inserts an existing Rich Text or standard text document. The existing text is not removed, but the contents of the external file are inserted wherever the cursor (insertion point) is located in the control.

Object… – Inserts an OLE object at the current cursor position:

Insert Object Dialog

The list of objects in the Object Type list depends on the registered OLE applications installed on your system. Common choices include Bitmap Image and Microsoft Word Document.

You may select the option either to "Create New," which creates a new, empty document of the specified type, or "Create From File" which lets you browse for an existing object to insert into the memo. In this example, a Bitmap is inserted into the memo:

Editing an Embedded Object

The OLE server registered with the object type is launched in the editor window. In this case, the MSPaint application is launched. To return to the FMS Rich Text Editor, simply click outside the bitmap object.

More Information

The following sections provide further information about the Rich Text Editor:

Using the FMS Rich Text Editor

Editor Components

File Menu Options

Edit Menu Options

Format Menu Options

Tools Menu Options


Format Menu Options

The Format menu provides menu access for some of the same actions that are available on the Formatting Toolbar and the Editing Ruler:

Format Menu

More Information

The following sections provide further information about the Rich Text Editor:

Using the FMS Rich Text Editor

Editor Components

File Menu Options

Edit Menu Options

Insert Menu Options

Tools Menu Options

More:

Font Formatting

Paragraph Formatting

Bullet Style

Tabs

Hyperlink


Font Formatting

Choosing Font from the Format menu invokes the Windows Font Common Dialog to allow setting font options:

Font Dialog

First select the text you wish to format, and then choose the Format|Font… menu option to display the dialog. You may set the font Name, Size, and Style (bold, italic, normal) as well as other properties such as color, or whether the text is underlined or displayed with a strikeout line.


Paragraph Formatting

Choosing Paragraph from the Format menu invokes the paragraph formatting dialog to apply selected alignment, indenting, and spacing options for the selected paragraphs:

Paragraph Format

More:

Paragraph Alignment

Paragraph Indentation

Paragraph Spacing


Paragraph Alignment

Choose Left, Center, Right, or Justify from the Alignment combo box on the Paragraph Formatting dialog, or from the [image], [image], [image], and [image] buttons on the formatting toolbar:

Left Alignment of Last Paragraph

Center Alignment of Last Paragraph

Right Alignment of Last Paragraph

Paragraph Alignment: Fully Justified


Paragraph Indentation

The paragraph indentation options are available on the Paragraph Formatting dialog.

Specify the "Left" and "First Line" indentation amounts in inches. Alternatively, you can set the same indentation options by using the slider controls on the Paragraph Ruler.

Move the upper and lower sliders on the Paragraph ruler in from the left margin. The upper and lower sliders should be at the same position.

Indented Paragraph

First Line Indent

To indent the first line of a paragraph, you should move the upper slider to the right of the lower slider:

First Line Indent

Hanging Indent

To indent all lines in a paragraph except the first you should move the upper slider to the left of the lower slider:

Hanging Indent


Paragraph Spacing

The paragraph spacing options are available on the Paragraph Formatting dialog.

Paragraph spacing determines the amount of space above or below a paragraph. If you want to set a paragraph off from other paragraphs on a page, or change the spacing between multiple paragraphs, you can increase the amount of space before or after the paragraph.

Once you set spacing options for lines or paragraphs, the setting becomes part of the paragraph formatting, and is contained in the paragraph mark. For example, if you're working in a double-spaced paragraph, and you press [Enter] to start a new paragraph, the double-space format is applied to the next paragraph and also to the blank space between the paragraphs.

Line Spacing

Line Spacing determines the amount of vertical space between lines of text. The Rich Text Editor uses single line spacing by default. The line spacing you select affects all lines of text in the selected paragraph or in the paragraph that contains the cursor.

Line Spacing	Results
Single	Accommodates the largest font in that line, plus a small amount of extra space. The amount of extra space varies depending on the font used.
1.5 lines	One-and-one-half times that of single line spacing. For example, if 10-point text is spaced at 1.5 lines, the line spacing is approximately 15 points.
Double	Twice the single line spacing. For example, in double-spaced lines of 10-point text, the line spacing is approximately 20 points.
At least	Minimum line spacing that the FMS Rich Text Editor can adjust to accommodate larger font sizes or graphics that would not otherwise fit within the specified spacing.
Exactly	Fixed line spacing that Word does not adjust. This option spaces all lines evenly.
Multiple	Line spacing that is increased or decreased by a percentage that you specify. For example, setting line spacing to 1.2 increases the space by 20 percent, while setting line spacing to a multiple of 0.8 decreases the space by 20 percent. Setting the line spacing at 2 is equivalent to setting the line spacing at Double. In the At box, enter or select the line spacing you want. The default is three lines.
At	The amount of line spacing you select. This option is available only if you select At Least, Exactly, or Multiple in the Line spacing box.


Bullet Style

Bullet Style – This menu choice (available from the Format menu) acts as a toggle. When the menu option is checked (or the [image] button on the Formatting Toolbar is pressed) the paragraph takes on the bullet style:

Bullet Style


Tabs

 Choosing Tabs from the Format menu displays the Tab dialog. Use the Tab dialog to set tabs for the selected paragraphs:

Tab Dialog

Specify the desired tab location, in inches, in the text box. Press [Set] to add the tab to the list of current tab stops. Press [Clear] to remove the selected tab from the list. To remove all tabs, press the [Clear All] button.

You may also set a new tab stop simply by clicking on the Paragraph Ruler:

Tab Example 1

To change the location of a current tab on the Paragraph ruler, simply drag the [image] picture on the ruler to a new location:

Changing Tab Positions


Hyperlink

Choosing Hyperlink from the Format menu sets the selected text to a hyperlink. A hyperlink is a "hot spot" that allows you to jump to another location. The location can include another file on your hard disk or company's network (such as a Microsoft Word document or a Microsoft Excel worksheet) or an Internet address (such as http://www.fmsinc.com). The field includes display text, which is often blue and underlined, that the user clicks to jump to the specified location. To set a hyperlink, simply select a block of text and select the Hyperlink menu option.


Tools Menu Options

The Tools menu contains the spell checker and other control options.

Tools Menu

More Information

The following sections provide further information about the Rich Text Editor:

Using the FMS Rich Text Editor

Editor Components

File Menu Options

Edit Menu Options

Insert Menu Options

Format Menu Options

More:

Spell Checking

Spell Options

Editor Options


Spell Checking

Choosing Spelling from the Tools menu displays the Spell Checking dialog.

The rich text editor does not include its own spell checker, but uses the Microsoft Office spell checker if it is available. Spell checking is available if Microsoft Office 2000 or XP was installed with Proofing Tools (i.e. Spell Checking). Since the FMS Rich Text Editor uses your spell checker, it supports your language and user defined words in the CUSTOM.DIC file that is used by other Microsoft Office components, such as Microsoft Word and Microsoft Access.

If proofing tools are installed, spell checking is enabled in the editor. To install the Microsoft Office Proofing Tools, run the setup program for Microsoft Office 2000 or XP, or any of the Microsoft Office programs that support the proofing tools (such as Microsoft Access).

When you select the Tools|Spell Checking menu option, the following dialog appears:

Spell Checking Dialog

The spelling dialog contains the standard spell checking options: the ability to ignore a particular misspelling, change it, or add the word to the custom dictionary.


Spell Options

Choosing Spell Options from the Tools menu invokes the Spell Options dialog to set options for the spell checker.

The Spell Options Dialog


Editor Options

Choosing Options from the Tools menu invokes the Options dialog to set options for the Editor. There are two tabs in the dialog. The first tab sets options that apply to the editor.

Code Editor Options Dialog, Options Tab

The second tab sets options that apply to the document.

Code Editor Options Dialog, Rich Text Tab


Troubleshooting

There are many resources available to resolve issues you may encounter. Please check the following:

Readme File

Check the README file for the latest product information. The README file can be opened from the Start group of Total Visual SourceBook.

User Manual

We've taken a lot of care and time to make sure the Total Visual SourceBook manual is very detailed. Check the Table of Contents and Index for your question, and read the appropriate pages.

On-line Help

The On-line Help system is also very detailed. Consult the Contents or Index of the On-line Help files to find the information you need.

Additional Resources

The following sections provide information on the other resources available:

Getting Help

Web Site Support

Contacting Technical Support


Web Site Support

The FMS web site contains extensive resources to help you use our products better. Resources include product updates, frequently asked questions (also known as FAQs), newsgroups, information on new versions, betas, and other resources.

Home Page

The FMS home page is located at:

www.fmsinc.com

News and important announcements are posted here.

Support Site

The main support page is located at:

www.fmsinc.com/support/

From this page, you can quickly locate the other support resources:

Product Updates

FMS takes product quality very seriously. When bugs are reported and we can fix them, we make the updates available on our web site. If you are encountering problems with our product, make sure you are using the latest version.

Product updates can also be checked using the update wizard. From the Windows Start menu, select the Update Wizard under your product group.

Frequently Asked Questions (FAQs)

Common questions and additional information beyond what is in the manual are often available from our FAQs.

Newsgroups

FMS also has general and product specific newsgroups where you can connect with FMS Technical Support and other users. Share your experiences, learn from others, and ask your questions in our virtual community. Point your web browser to:

www.fmsinc.com/support/newsgrp.htm

Or visit our web site for additional information.

Microsoft Patches

Our support site also includes links to Microsoft patches that are related to our products. Make sure you're using the latest versions by checking here or visiting the Microsoft site.

Additional Resources

The following sections provide information on the other resources available:

Getting Help

Troubleshooting

Contacting Technical Support


Contacting Technical Support

If the previous suggestions fail to resolve your problem, contact our technical support department. We are very interested in making sure you are satisfied with our product.

Registering Your Software

Please register your copy of Total Visual SourceBook. You must be registered to receive technical support. Registration also entitles you to free product updates, notifications, information about upcoming products, and beta invitations. You can even receive free email notification of our latest news.

You may register your software by mailing in your registration card or directly from our web site:

www.fmsinc.com

Support for Licensed Developers Only

FMS provides technical support for licensed developers using or distributing Total Visual SourceBook. FMS does not, however, provide technical support or customer service for users of your applications that use our controls — this is your responsibility.

Contact Us

The best way to contact us is via email at:

•	Email:	support@fmsinc.com

With the exception of installation problems, telephone support is not currently available.

Please provide detailed information on the problem. This should include the name of the product, version, your operating system, and the specific problem. If the product generated an error file, please submit that as well.

With email, technical support issues can be more accurately resolved and tracked in our internal technical support system. It also gives us more time to understand the entire problem and allows our technical support staff to contact the developers with the entire story when necessary. Please bear in mind that a unique issue may involve meetings between the technical support staff and product developers, so your patience is appreciated.

Microsoft Technical Support

FMS only provides technical support for its products. If you have questions regarding Microsoft Windows, Microsoft Office, or Microsoft Visual Basic, please contact Microsoft technical support, or the FMS newsgroups.

Additional Resources

The following sections provide information on the other resources available:

Getting Help

Troubleshooting

Web Site Support


License Agreement - License Agreement
License Agreement

PLEASE READ THE FMS SOFTWARE LICENSE AGREEMENT. YOU MUST AGREE TO BE BOUND BY THE TERMS OF THIS AGREEMENT BEFORE YOU CAN INSTALL OR USE THE SOFTWARE.

IF YOU DO NOT ACCEPT THE TERMS OF THE LICENSE AGREEMENT FOR THIS OR ANY FMS SOFTWARE PRODUCT, YOU MAY NOT INSTALL OR USE THE SOFTWARE. YOU SHOULD PROMPTLY RETURN ANY FMS SOFTWARE PRODUCT FOR WHICH YOU ARE UNWILLING OR UNABLE TO AGREE TO THE TERMS OF THE FMS SOFTWARE LICENSE AGREEMENT FOR A REFUND OF THE PURCHASE PRICE.

Ownership of the Software

The enclosed software program ("SOFTWARE") and the accompanying written materials are owned by FMS, Inc. or its suppliers and are protected by United States copyright laws, by laws of other nations, and by international treaties. You must treat the SOFTWARE like any other copyrighted material except that you may make one copy of the SOFTWARE solely for backup or archival purpose, and you may transfer the SOFTWARE to a permanent storage device.

Grant of License

The SOFTWARE is available in a single license or 5 license version. Contact FMS, Inc. to purchase additional licenses.

Licenses are granted on a PER DEVELOPER basis. For each license, one designated developer can use the SOFTWARE on one computer at a time.

Redistributable Components

Only the Library Code included in the SOFTWARE may be redistributed. Library Code is defined as the programming code that is available when using the SOFTWARE program's Code Explorer interface. You are specifically prohibited from redistributing any other file or part of the SOFTWARE.

Use and Redistribution Rights

FMS grants you the right to distribute the Library Code on a non-exclusive, royalty free basis, provided that:

1.	Each developer using the program owns a license of the SOFTWARE.

2.	You do not distribute the library code, in whole or in part, in any form that does not add primary and substantial value to the library code.

3.	You do not distribute the library code in an application that is similar in nature or purpose to the SOFTWARE.

4.	You agree to indemnify, hold harmless, and defend FMS and its suppliers or contractors from and against any claims or lawsuits, including attorneys' fees, that arise or result from the use or distribution of or other activities relating to your software.

5.	If you claim a copyright, you must add a clause stating "Portions of this program are Copyright Total Visual SourceBook from FMS, Inc." and that you do not claim ownership of the SOFTWARE.

Publishing Library Code

You are prohibited from publishing library code on any medium, including, but not limited to, electronic mail, online services, internet newsgroups, and printed matter, except when library code is distributed in an application that adds substantial value to the library code and that application is not similar in nature or purpose to the SOFTWARE.

The Library Code may not be included in freeware or shareware applications in a non-compiled state.

Other Limitations

Under no circumstances may you attempt to reverse engineer this product. You may not rent or lease the SOFTWARE, but you may transfer the SOFTWARE and the accompanying written materials on a permanent basis provided you retain no copies, the recipient agrees to the terms in this SOFTWARE License, you remove all installations of the SOFTWARE, and you have not used any of the Library Code in an application. Ownership transfers must be reported to FMS, Inc. in writing.

Technical Support on Library Code

Because of the complexity of software development, FMS does not provide technical support related to the use of the Library code in your applications. Technical support is available for issues you find on the Code Explorer application and issues with the included Library Code and associated documentation.

Limited Warranty

If you discover physical defects in the media on which this SOFTWARE is distributed, or in the related manual, FMS, Inc. will replace the media or manual at no charge to you, provided you return the item(s) within 60 days after purchase.

ALL IMPLIED WARRANTIES ON THE MEDIA AND MANUAL, INCLUDING IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE LIMITED TO SIXTY (60) DAYS FROM THE DATE OF PURCHASE OF THIS PRODUCT.

Although FMS, Inc. has tested this program and reviewed the documentation, FMS, Inc. makes no warranty or representation, either expressed or implied, with respect to this SOFTWARE, its quality, performance, merchantability, or fitness for a particular purpose. As a result, this SOFTWARE is licensed "AS-IS", and you are assuming the entire risk as to its quality and performance. IN NO EVENT WILL FMS, INC. BE LIABLE FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES RESULTING FROM THE USE, OR INABILITY TO USE THIS SOFTWARE OR ITS DOCUMENTATION.

THE WARRANTY AND REMEDIES SET FORTH IN THIS LIMITED WARRANTY ARE EXCLUSIVE AND IN LIEU OF ALL OTHERS, ORAL OR WRITTEN, EXPRESSED OR IMPLIED.

Some states do not allow the exclusion or limitation of implied warrantees or liability for incidental or consequential damages, so the above limitations or exclusions may not apply to you. This warranty gives you specific legal rights, you may also have other rights that vary from state to state.

U.S. Government Restricted Rights

The SOFTWARE and documentation are provided with RESTRICTED RIGHTS. Use, duplication, or disclosure by the Government is subject to restrictions as set forth in subparagraph (c) (1) (ii) of the Rights in Technical Data and Computer Software clause at DFARS 252.227-7013 or subparagraphs (c) (1) and (2) of the Commercial Computer Software - Restricted Rights at 48 CFR 52.227-19, as applicable.

Manufacturer is FMS Inc., Vienna, Virginia. Printed in the USA.

Total Visual SourceBook is copyright ©1996-2002 by Financial Modeling Specialists, Inc.
All Rights Reserved.
Microsoft, Microsoft Access, Microsoft Word, Microsoft Excel, Microsoft PowerPoint, Microsoft Outlook, Microsoft Windows, Windows for Workgroups, Windows NT, Visual Basic, and Visual Basic for Applications are registered trademarks of Microsoft Corporation.
Printed in the USA.