Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Previewing an image

Status
Not open for further replies.

StevenK

Programmer
Jan 5, 2001
1,294
GB
I'm looking at either storing images in a database (or at least the paths to the image files) such that a user can cycle through a list of stock codes and then view a picture of the required item.
I have Windows 2000 on my laptop and ideally would like to replicate the feature whereby if you focus on a (graphic) file in Windows Explorer you get a preview (albeit small and not as precise as could be) of the picture.
Is there any way of producing a feature like this through delphi code, such that the user cycles through the stock items, getting previews of the items until a point where they want to view the full graphic when we would open the picture in a more appropriate window ?
Anyone make any suggestions on this one ?
Thanks in advance.
Steve
 
hi,

a way to preview images is as follows:

use a filefirst/ filenext function to load the filenames you want to view in a listbox or use a component to view the filenames.
Use an Timage on the form and when you scroll through the list you use the command :

Image1.Picture.LoadFromFile('filename.bmp');

where 'filename.bmp' is the name of the file from the listbox

Steph

 
Thanks for that Steph.
Will this have the same impact on memory regardless of the size of the actual TImage component that I place on the form.
For a preview, ideally I should have a small TImage (until a point where the user wants to view the picture in full - in a bigger TImage - or opening the picture in another application or window). Will this take as long (and have the same impact) as using a bigger TImage. Is the size of the TImage not a deciding factor ?
Steve
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top