C# timer issue
-
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.
-
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.
Supra2 wrote:
What could be the reason.
You are not calling Invalidate()[^] method. It will redraw the control. :)
Navaneeth How to use google | Ask smart questions