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!

do you use another thread for that?

Member Avatar for iamthwee

Haved you googled "c# + scrolling text" perhaps for ideas?

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 ??????

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

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.