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.)