473,408 Members | 1,728 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,408 software developers and data experts.

need slide sorter functionality

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
Nov 17 '05 #1
3 2320
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.)

Nov 17 '05 #2
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

"Steven Cheng[MSFT]" wrote:
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.)


Nov 17 '05 #3
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.)

Nov 17 '05 #4

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

Similar topics

5
by: Al Davis | last post by:
Note: I tried cross-posting this message to several newsgoups, including comp.lang.perl.misc, c.l.p.moderated, comp.infosystems.www.authoring.cgi, comp.lang.javascript and comp.lang.php. Nothing...
2
by: Mekon | last post by:
I have never written a line of script in my life but I need some help with it now. I have this auto generated code which I want to modify if possible The script generates a strip of...
0
by: Ata | last post by:
Hello, I am trying to copy the contents of the output of SQL Reporting Services to a PowerPoint slide. For this, I am using SQL Reporting Services to obtain an IMAGE stream, which I paste to the...
4
by: Michael Klatt | last post by:
I need to design a container similar to a std::set, but where the stored objects may be modified via a non-const iterator. In some cases the modification will effect the sort order. Here's an...
5
by: TrvlOrm | last post by:
HI There, I have been struggling with JavaScript code for days now, and this is my last resort! Please help... I am trying to create a JavaScript slide show with links for Next Slide,...
9
by: Michael Burtenshaw | last post by:
I would like to make a slide show using random images. The problem is my host is 250.com, and they don't support cgi-programs. Is there another way to accomplish random images?
2
by: Telvanni | last post by:
Ok I'm having problems just figuring out how to convert this Sorter void BubbleSort (int list, int length) { int temp; int counter; int index; for (counter = 0;...
3
by: ITAutobot25 | last post by:
Now this is really the last problem (for real now) with this assignment. My sorter is not working. I managed to sort by product name in my previous assignment; however, I can't get it to work on this...
2
by: vineetbindal | last post by:
Hi all, We have a slide show in a page which shows slids rotating after every 8-10 seconds with some descriptions about them. The problem is if the connection speed is slow then the page loads...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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:
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...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
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...

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.