Click here to Skip to main content
15,889,200 members
Please Sign up or sign in to vote.
2.00/5 (1 vote)
See more:
Hi,

Iam using a picture box to show some images.
I have set of images stored in SQL server and this data will be fetched according to some conditions. I have to play all these set of images one by one like slide

iam using data table to fetch and store all the data.
Iam using Timer event but it is showing only the last picture.

Pls Help
Thanks and regards
Nirmala Saravanan
Posted
Comments
BillWoodruff 9-Dec-13 9:24am    
Why, exactly, do you need to pass an extra parameter to a Timer Tic EventHandler ? Please show your code for the Timer.

You don't need to pass any additional information to the Timer Tick event handler: just declare the variable at class level within your form and access it normally - it will work exactly like any other class field.
 
Share this answer
 
Comments
Nirmala Devi Saravanan 9-Dec-13 9:40am    
i tried without passing parameter.But Still it is showing the last picture.I want to show the picture like slide for every second
Mike Meinz 9-Dec-13 9:47am    
We have no idea what you are actually doing. Unless you show your actual source code, you will not get much help. Use the Improve Question link above and put your source code into your question.
OriginalGriff 9-Dec-13 9:57am    
Did you declare the variable as part of the class
private int picture number = 0;
Or á part of the tick event handler
private void Timer_TickEvent(...)
{
int picture number = 0;
...
}
It's simple. You can't pass any additional data in the Time Tick event. You have to keep track of this additional data outside the event. But, since we have no idea what you're code looks like, it's impossible to tell you what you should be doing instead.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900