| TWAIN Support in ObjectPAL: Sample Projects |
|
|
|
| Contributed by Paul Cronk | |
| 11 August 2001 | |
|
TWAIN Support in ObjectPAL® Sample Projects © 2001 Paul Cronk Sample Projects Picture Saver The Picture Saver application mimics a photo-album. It contains thumbnails of all the pictures stored in a table. The table has two fields, the first is the key field, and the second the path and filename of the graphic. Graphics are generally not stored in tables since the BDE expands graphic files into bitmaps before storing the graphic. Graphics may have been acquired into a .jpg or .gif format, and thus, the difference in file size warrants special handling of the graphics. In the Picture Saver application, we store the graphic outside of the table, and store the filename in the table. Picture Saver Startup Script Abstract: The Picture Saver script sets the alias for the application and calls the main form. Use the startup script to ensure that the 'PictureSaver' alias is set before reviewing the samples.Picture Saver Dialog Abstract: The Picture Saver dialog contains a thumbnail view of the pictures in the photo album. To accomplish the thumbnail view, we place the key field and a graphic object in a multi-record object. On the newvalue() event of the key field, we load the appropriate graphic from the file, and assign it to the graphic object.Add Picture Dialog Abstract: The Add Picture Dialog is used to acquire images from a data source, or to import images into the table. The Select Source button brings up the Picture Saver Select Source dialog.Select Source Dialog Abstract: Our Select Source dialog mimics the behavior and operations of the Select Source dialog displayed by source manager. In this dialog, we ask the source manager for a list of data sources, and populate a list box with them. The code has an OK and a Cancel button, and returns the name of the data source selected.Download the Picture Saver Sample Next: Advanced Techniques Previous: Function Reference |
| < Prev | Next > |
|---|





