المساعد الشخصي الرقمي

مشاهدة النسخة كاملة : how to change a value over a set period of time



C# Programming
05-01-2010, 01:30 PM
Hi again

trying to create a simple video fade effect by changing the contrast value of video from 0 to -128 over a period of 2 seconds, tried using time_tick and a for loop but it didnt work as all that happened was timer started and then loop exacuted

timer set to 100 millisecs




private void timer1_Tick(object sender, EventArgs e)
{
for (int i = 0; i < -128; i--)
{
contast = i
}

}


anyone point me in right direction
thanks