Adding the Visual Basic Ecco Toolkit To Your Project

Here are the steps for using the Visual Basic Ecco Toolkit to your project.

NOTE: The Visual Basic Ecco Toolkit is written in Microsoft Visual Basic and requires the Visual Basic 6 runtime (MSVBVM60.DLL) to be used either in a development environment or by a user.  The programming direction and examples in this help file demonstrate how to use it to build applications in Microsoft Visual Basic.  However, other programming and scripting languages which support ActiveX components and COM automation (e.g. VBScript, VBA, Visual C++) can use the Visual Basic Ecco Toolkit.

Note: VBECCO.EXE needs to be distributed with your application, and needs to be registered on users' computers.  This can be done by having your Setup program launch it using the Shell statement.  Or, a self-installing application can test to see whether VBECCO.EXE is registered, and register it if necessary.

	Dim MyEcco as EccoApp
	Dim PhoneBook as EccoFolder
	Dim Contacts as EccoItems
	Dim MyContact as EccoItem
   Set MyEcco = New EccoApp

For those with a personal license, here is the correct syntax:

   EccoApp.Register DeveloperID

The first time that you do this on any computer, you will be prompted to enter the User Name and User ID that you were provided when you registered.  If this information is valid, this information will be saved in the Registry and you will not be prompted for it again.

For those with a developer license, the syntax is:

   EccoApp.Register DeveloperID, [UserID], [UserName], [Expiration]

Note, you can specify an expiration date for your application, or require the user to supply registration information (through a dialog box, or read from the Registry).  Here are a couple of different examples.  Note, in these examples, "xxxxxxxx" would be replaced with your valid developer code.

	'Register only if the user has valid credentials
	MyEcco.Register "xxxxxxxx", UserID$, UserName$

	'Register only if the expiration date hasn't passed
	MyEcco.Register "xxxxxxxx", 0, 0, #12/31/2001#

	'Register unconditionally
	MyEcco.Register "xxxxxxxx", -1, -1, 0

Your application can test whether it was successfully registered by reading the Registered property and acting accordingly.  Note, if registration fails, and you thereafter try to use any of the VBEcco objects, an error will be returned.

	If MyEcco.Registered = False then
	    MsgBox "Invalid User ID!"
	    End
	End If

Also, while in a Visual Basic code window, when you enter the name for a declared object variable and then press the period, you will be presented with an auto-complete list of the available properties and methods.

	Set MyEcco = Nothing

It is important that you include this statement before your application terminates.  Otherwise, VBECCO.EXE will not be unloaded from memory.  Note: a user can have more than one application which uses the Visual Basic Ecco Toolkit running at one time, provided that only one such application can communicate with Ecco at one time!  The Visual Basic Ecco Toolkit keeps count of the number of applications which use it, and will exit and remove itself from memory when the last application exits.