You need to have a few pictures, put them in a loop load under a timer event, and you will have a slide show.:)
I'm just a beginner, i don't know much about the loop load part.
Is there any other way possible?
I'll post some solutions tomorrow morning (another 11 hours my time) and we will see where this is going. You do however need to read up on this kind of coding, it is more advance than beginner stuff, sorry.;)
We can not keep on giving you the full solution to all your problems, post some code here where you have at least tried to make it work, and I will gladly give help.:)
Ok no problem.
The process is pretty straight forward if you know a few key controls. One is a picturebox/image control which will be used to display the image. Another is the timer control which will be used to execute the loading of the next picture after a specified number of "ticks" and the last bit is the LoadPicture() function which will be used to load a picture file into the picturebox control.
Essentially how it works is that you add a picturebox or image control as well as a timer control to your project. Then double click the timer control to open up the timer's default tick event, in there you will use the LoadPicture function to load a picture from your computer (specifying its path) into the picturebox/image control through its picture/image property. After so many milliseconds on the timer, it will execute, load a picture into the picturebox.
The trick is getting a list of pictures you want shown and incrementing through them. The concept is not hard, but it will take a bit of careful planning to make sure that you get the right files and in the order you want to show them.
There is another control in your toolbox called an "imagelist" control. That will allow you to store all your pictures. Using that, you can feed images to your picturebox. The parts you will need are...
1) Picturebox to show the current image
2) Imagelist control on your form to hold all your pictures and to fetch the next "slide" from.
3) Timer control will allow you to pull the next picture at a given interval (change slides after X seconds)
The timer control calls an event every X number of milliseconds. This event is called the "tick" event. In that event you will read your next picture out of the imagelist control and then load it into your picturebox control. When you reach the end of your pictures in the imagelist control, you can reset your picture counter to 0 and start over pulling images out of the imagelist control.
So look at those three controls (and their properties like the "Picture","ListImages collection" and "interval"), the tick event (where most of your code will go) and you will have a great start for your project. Below is a link to a page showing you how to pull images out of the Imagelist using the ListImages collection.
This is the basic planning behind it...;)
a Loop will be something like -
Dim picImage as ListImage For Each picImage in ImageListImageList1.ListImages Picture1.Picture = picImage.Picture Next
If you knew the image you wanted to move to a PictureBox, you could just code this:
Picture1.Picture = ImageList1.ListImages(3).Picture 'or this: Picture1.Picture = ImageList1.ListImages("Smiley").Picture
Put this code under a timer with its interval set to say 1000 (1 second). It will now load every picture in order as in your imagelsit control.:)
Hey, thank you so very much...
Your a guru...
:) It was a pleasure. Happy coding.
this is exactly what i want.. but can u plz send me the source code plz urgent.. i am not geting this
Edited 2 Years Ago by kiran.magic.freak
I want to become a programmer, I need your help gurus.
Where will I put the first codes? There is an error in
For Each picImage in ImageListImageList1.ListImages
Help! I want to create a java program that finds the highest even integer among the values entered by the user. Stop asking values when a value less than 1 have been entered. If no even integer is entered, display "No Even Integer"
Here is the sample output that I ...
Hello All ...
Iam Getting An Error With try to excecute the stored procedure .
I have Have Sql database , the stored procedure like so :
USE [MPRS] GO /****** Object: StoredProcedure [dbo].[Search_Licenses_By_Number] Script Date: 26-Nov-16 8:06:52 AM ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO ALTER PROCEDURE ...
Hi, as I was told that my code doesn’t scale well at all, I thought perhaps I’d try to get a better understanding of interfaces/abstract classes and classes and the relationship between them.
I don’t want at this stage work on a big separate project as I've already got plenty ...