need slide sorter functionality

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am storing images in a database and need a way to browse those files. I
can load the files into an image list or whatever the control needs, but I
need a control.

It doesn't seem that any of the standard window controls would work, but I
am thinking I can just draw all the images on an panel (or a browser form for
that matter).

Does anyone have any advice?

Thanks
Bob
 
Hi Bob,

Nice to see you again. From your description, you're going to develop a
winform app which will display some images(retrieved from database) as a
slide show , and since there is no buildin such ImageSlider control, you're
thinking of building a custom control on this, yes?

I think your idea on drawing the images on a panel or .. on the form is
reasonable. In fact, the System.Drawing namespace's API provide us enough
functions to manipulate image and graphics. As a general idea, I would
consider the following steps when building such a control:

1. Since the Winform application is a clientside app, all the runtime
resource can be put into the memory. We can load and cache all the images
necessary for the slide show at startup time of the app(or loading time of
our custom Image Slide control). The cache store maybe imageList or
anyother store(hashtable) we prefer. Also, sometimes loading all images
is time consuming, we can consider lazy loading (load each image on demand
) in such situation.

2. When displaying a certain image, we can directly draw the Image on a
certain perdefined section on the Control's Display Area using the
System.Drawing's api. Or we can also use a PrictureBox control and put it
on our customControl. Then, we only need to specify the image source for
the PictureBox when we need to display a certain image on our control.
And when switching the images in our slide control, we can simply indexing
that image in a ImageList throw index or locate the image throw a key
value in hashtable.......

Please feel free to let me know if you have any other questions or ideas.
Thanks,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
 
Hi Steven,

I am building a browser form that I can open when I need to pick an image.
And I am amazed at how easy it was.

When I store the image in the database, I also store a thumbnail of the
picture, so I can load the thumbnails from the database quickly. I don't
think there will be many images in the db, usually less than a hundred. I am
thinking this will save me from doing a lazy load, and it is nice for the
user to see all the images. My PhotoManager class does this and returns an
ArrayList of images.

In the form I just created a rect and used offest to draw rows and columns.
It took about 20 minutes! I love this language!

I am modifying the approace a little, I put the images in custom controls
and they will have a click event that notify the form when an image has been
selected.

I am having so much fun with C#, please pass that on to any MSFT people.

Thanks again for your help,

Bob
 
Thanks for your quick response.

I'm really glad to hear that you've managed to find a quick solution on
this. Yes, .net framework is just aim at abstracting the programming
intefaces on windows platform so as to make the developer's work more
convenient. And C# is one of the pioneer programming language for .NET
developging. Surely I'll bring your compliment to our C# guys, I'm sure
they'll be very happy that their works has helped our customers :--)

Anyway, please always feel free to post here when you need any help. Thanks
again for choosing Microsoft.

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
 
Back
Top