0

Dear All,

I'm tring to build << Announcments Ticker/Scroll >> using OnPaint event to draw a text on the form, then I added a timer 'interval=10' to change the X-coordinate of the graphics object so it start moving to the left

I noticed the following:
1. It is using more the 40% of the CPU utilization.
2. It is not smooth even I'm enabling DoubleBuffer.

How can I build a smooth ticker/scroll such as the one which is used in the satellite TV channels for SMS Chat and breaking news?? Any ideas ?

Please HELP!

3
Contributors
4
Replies
6
Views
10 Years
Discussion Span
Last Post by Ramy Mahrous
0

Thanks all!

NO. I didn't think this will help .. please explain how to control OnPaint event from a seperate thread?

I tried my best to search .. all articles are discussing the same idea of using DoubleBuffer and a Timer.

I wonder how the program which is used by the TV channels can draw emotions/faces and text and move more that three scrolls at the same time smoothly ??????

0

No, they used programs like "Adobe Flash" sure the directors are not directX programmers :D
btw, about the new thread in OnPaint

OnPaint(...) 
{
ThreadStart thrdStart = new ThreadStart(Draw);
Thread thrd = new Thread(thrdStart);
thrd.Start();
}

Draw is the method used to draw or move the text

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.