473,405 Members | 2,310 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

How to show thumbnails

How can I have a box (maybe a picture box or a panel or something?) that
will display all of the contents of a particular folder and show the picture
files as thumbnails along with the name of the file right below them?

I then need to be able to drag each item onto another picture box (or
something similar) where the picture will be displayed.

How can I accomplish this?

I have c#
Nov 17 '05 #1
2 3913
You can display the pictures in a PictureBox just fine. From your post, I'm
wondering how much you know about C#? It sounds like you don't have much
experience at all with it. In fact, your question sounds a lot like, "Can
someone write this program for me?" In which case, you probably won't get an
answer to that question.

People here will be happy to help with specific problems, but I doubt anyone
is going to take the time to write the program for you.

But, if that's not your question and I'm assuming too much, here's a rough
idea of the direction to go:

You'll need to load the images from the folder one at a time. See the Image
class. To create thumbnails, you'll need to scale them down to whatever size
you want the thumbnails to be. This involves calculating a simple aspect
ratio and then scaling by a factor to maintain the aspect ratio (unless you
don't mind the images being squished in one direction or another).

You'll want to dynamically create PictureBox controls and place them on your
form, setting the location of each one and setting the Image property.

There's a sample app here that does a lot of this:
http://www.codeproject.com/useritems...Search_API.asp

Instead of loading the files from a folder, it gets them from Google Image,
but the rest is pretty similar to what you're trying to do.

Pete

"Keith Smith" <ke*********@verizon.net> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
How can I have a box (maybe a picture box or a panel or something?) that
will display all of the contents of a particular folder and show the
picture files as thumbnails along with the name of the file right below
them?

I then need to be able to drag each item onto another picture box (or
something similar) where the picture will be displayed.

How can I accomplish this?

I have c#

Nov 17 '05 #2
The best way would be to enumerate all the files and add them to a ListView
control and then use the shell interface IExtractImage to extract the
thumbnail for each file. This involves some pretty heavy P/Invoke stuff
though.

----------------
-Atul, Sky Software http://www.ssware.com
Shell MegaPack For .Net & ActiveX
Windows Explorer GUI Controls
&
Quick-Launch Like Appbars, MSN/Office2003 Style Popups,
System Tray Icons and Shortcuts/Internet Shortcuts
----------------

"Keith Smith" <ke*********@verizon.net> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
How can I have a box (maybe a picture box or a panel or something?) that
will display all of the contents of a particular folder and show the
picture files as thumbnails along with the name of the file right below
them?

I then need to be able to drag each item onto another picture box (or
something similar) where the picture will be displayed.

How can I accomplish this?

I have c#

Nov 17 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Lemming | last post by:
Hi, I'm putting together a website for a local estate agent. One of the things they want to do is upload property descriptions/prices/etc. plus a picture of the property which is for sale.
5
by: Ken | last post by:
I am in the process of designing my first web-site, and am having a problem with my picture gallery. My thumbnails are all different sizes, I would like them to be one size. The manual does not...
7
by: 7mary4 | last post by:
I am working on a kiosk for a museum, we will be using firefox as the browser, with windows, and a touch screen. We'd like to create a slide show of a small portfolio when the visitors click...
3
by: Vagabond Software | last post by:
I'm trying to display thumbnail images in a Listview that look more like the Windows thumbnail view. Everything is working pretty good, but my thumbnails are decidedly not like the Windows...
7
by: Rudy | last post by:
Hello All! After working in the television industry, moving to a developing career has been interesting to say the least. 3 years of developing with books, and the help of you fine folks on this...
4
by: Barely Audible | last post by:
Guys I was wondering if it was possible to have a js file that, when the page loaded, it automatically generated a a set of thumbnails from directory of the page on the web server? Or would...
5
by: JJ | last post by:
I have a gallery-like application. (The gallery will be actually presented in Flash, but the management (cms) of the images will be in asp.net. ) My question is, is it ok to create Thumbnail...
1
by: iswar | last post by:
hi friends asp.net(2.0) c# i am trying to create an image gallery in which all the uploaded image are converted into thumbnails and i want to bind these thumbnails into gridview. and on clicking...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.