473,761 Members | 9,480 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 3937
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*********@ve rizon.net> wrote in message
news:%2******** ********@TK2MSF TNGP10.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*********@ve rizon.net> wrote in message
news:%2******** ********@TK2MSF TNGP10.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
5195
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
3672
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 address this situation. Where did I go wrong?
7
3060
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 down to the lowest level of the collection. For instance, after choosing Africa, then Sudan, they will choose what they would like to look at: jewelry, tapestry, metals, etc. When they choose tapestry, there will be groups of ten thumbnails. These...
3
11401
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 thumbnails. View the following snapshot to compare the Windows thumbnails (top) to my ListView thumbnails (bottom): http://home.san.rr.com/vagabondia/images/tmp/sample.gif It looks like the Windows thumbnails retain their proportion by, perhaps,
7
3080
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 forum, I have learned quite a bit. But that doesn't mean anything when your looking for your first developing gig. 15 years in television production, and not having a college degree in Computer Science does not make me a very good prospect....
4
1779
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 this create an unacceptable security hazard? TTFN Barely
5
1992
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 images on the fly by resizing the original sending it to the output stream (i.e. Response.ContentType = "image/jpeg"; Response.BinaryWrite(imageContent) ), or best to actually save the thumbnails to disk. Would this method result in a much slower...
1
1155
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 in this thumbnails displayed in grid the orginal image is shown in a pop-up. now i hav succeded in creating thumbnails from uploaded images pls any one help me how to bind these thumbnails in gridview by storing it in a folder.. thanks a lot for...
0
9531
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9345
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
9905
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9775
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8780
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7332
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5229
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5373
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3881
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.