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

مشاهدة النسخة كاملة : C# timer issue



C# Programming
03-30-2009, 03:30 PM
I have an application where I am redrawing some images after each second. For this I have written a handler for timer in which i am calling one function which draws image. In timer i am incrementing number and based on the number i am displaying or redrawing image. In OnPaint event these images get displayed. But when I am trying to do this with timer event handler iam unable to display different image. I need to do ALT + Tab and again select the same application then my OnPaint gets called and whaever value of number the same image is get displayed. I want this to automatically displayed in sync with timer. What could be the reason.