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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Browse pictures from files

Status
Not open for further replies.

jpaulino

Programmer
May 28, 2002
26
0
0
DE
Hi all,

I would like to browse some pictures according with files that I have. I have one directory for the pictures (e.g. 20070502) and one (with the same name plus “t” e.g. 20070502t) for the thumbnail. The problem is that I would like to show only 8 thumbnail per page and the number of pages in the bottom.

I have made something like this with the results of a access database but I can’t apply to this.

Any help?

Tanks in advance
Jorge
 
Sheco thank

It helps but how can I do something like ... page 1 2 3 next ... browsing 6 or 8 pictures per page ?

Jorge
 
From the Files collection you get the number of files in the directory. Assuming you only have the images in that directory, you can determine the number of page links to display by:
x = Round Down(Number of Files/2) 'one thumbnail and one full size picture per and round down in case windows made the browse file
y = Round Up(x/8) '8 pictures per page rounded up to nearest whole page number

When it comes time to display the files you should know what page your on and be able to find the files based on that page number. The indexes for the file collection for a given page would be something like:
(Page Number - 1) * 2 * 8
to
(Page Number) * 2 * 8 - 2

Just guessing, but it should be possible to correct those equations and convert them to code for use with the Files collection Sheco pointed out.



 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top