Getting Started, "Take Data Presentation to the Next Level," by Andy Rosebrock (Visual Studio Magazine, February 2002)

To view this document in Notepad, make sure you have 
"Word Wrap" enabled by clicking on the Edit/Word Wrap 
menu.

Supplemental ReadMe.txt file to the ImageLibrary Projects
-------------------------------------------------------
The projects shown here illustrate the concepts described in the VBPJ article "Bring Your Data Presentation to the Next Level". The purpose of these projects is to help you understand how to implement the DataRepeater control in your projects. Two projects are used to demonstrate how to use the DataRepeater. Each project is explained in greater detail below.

Before You Get Started
----------------------
*It is recommended that you use the most recent service pack of Visual Basic (SP5 for VB6).

*The ImageLibrary project uses ActiveX Data Objects (ADO) 2.6. The project will work with older versions of ADO, but to obtain the newest version, go to: http://www.microsoft.com/data.

*Both projects use the Microsoft Scripting Runtime (scrrun.dll), which is installed with VB6. Make sure the "Microsoft Scripting Runtime" is selected in the Project | References.

The CtlImageRepeater.vbp Project (ActiveX Control)
--------------------------------------------------
The CtlImageRepeater.vbp project is used to create an ActiveX control. This custom control will then be used in the ImageLibrary.vbp project to bind data. For the ImageLibrary project to work properly, this project must first be compiled into the CTLIMAGE.OCX. When the OCX is compiled, VB automatically registers the file. If you do not compile the OCX, or manually register the OCX, the ImageLibrary project will not know which control is used to bind the data. Whatever you name the OCX's project is the name that will later appear in the DataRepeater's available components list (Note: The project "Name" is not the same thing as the VBP filename). For example, the sample OCX project's name is ImageCtl -- this is the name you would look for when setting the DataRepeater's RepeatedControlName property (in the ImageLibrary project).

The ImageLibrary Project
------------------------
This project uses the custom control created in the CtlImageRepeater.vbp project, to bind data to the DataRepeater control. For this sample application to work properly, make sure all the project's files (i.e. BAS, FRM, etc.) are located in the same directory as the VBP file. The ImageLibrary.mdb file should also be located in the same folder.

Make sure the custom control you created above is selected in the DataRepeater's RepeatedControlName property. Select the control from the list -- "ImageCtl.ctlImage" if you compiled using the default information above.

Running the Sample Application
------------------------------
Note: The sample project's database is empty by default -- therefore, you will not see any images or data in the DataRepeater control when you first run the project. Using the ImageLibrary application, You must first add records before any will be visible in the control.

The ImageLibrary project is designed to demonstrate the DataRepeater control. The application saves information about image files located on your computer/network. The image's path (filename), category (i.e.: Web Images, Animated GIF, etc.), and name (any name you supply) are stored within the ImageLibrary.mdb database. When the DataRepeater control is propagated with the data, the image's path is used to display a thumbnail image. You can Add, Modify, Delete and View all records with this interface. All record changes (additions/modifications) are completed on the frmImage.frm form.

You can easily modify this project to categorize any file type on your system. Likewise, you can add more detailed information for each image record (color, sub-category, etc.). Simply modify the ActiveX control to contain all of the data bound controls, recompile the OCX so the changes will be reflected in the sample application, and make the proper changes to the ImageLibrary project.