By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
432,257 Members | 925 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 432,257 IT Pros & Developers. It's quick & easy.

Smooth Scrolling Text using GDI+

P: n/a
Hi,

I have been trying to get text to scroll smoothly accross a windows form
using GDI+ and a timer. Changing the position of the text by a configurable
amount and calling invalidate to force a redraw at various intervals ( based
on the timer ). The text is not moving that smoothly, it seems very jerky,
no matter what combination of timings and pixel amounts to move so I have
looked at other code and posts and they all seem to have the same problem.
'Double Buffering' is a technique refered to but when I turn this on using
the property of the form the text is only visible periodically ! I have seen
an example of scrolling text using Double Buffering but to be honest I didnt
think it was that much smoother than what I already had.

Am I wasting my time trying to get smooth scrolling text in a windows forms
uisng GDI
app and if so why !! If it is possible is there any C# .Net 2.0 code
floating around I could look at ?

I was thinking of having a stab at some Direct X ! Is this the way to go ?

Thanks.

Jon
Apr 19 '07 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Try www.codeproject.com
I made it scrolling smooth but I can't make it scroll faster. Putting
DrawText routine
on another threed speed up great but CPU utilization is 100%. If I put
thread to sleep Thread.Sleep(1) everything slow down as before.

"Bishman" wrote:
Hi,

I have been trying to get text to scroll smoothly accross a windows form
using GDI+ and a timer. Changing the position of the text by a configurable
amount and calling invalidate to force a redraw at various intervals ( based
on the timer ). The text is not moving that smoothly, it seems very jerky,
no matter what combination of timings and pixel amounts to move so I have
looked at other code and posts and they all seem to have the same problem.
'Double Buffering' is a technique refered to but when I turn this on using
the property of the form the text is only visible periodically ! I have seen
an example of scrolling text using Double Buffering but to be honest I didnt
think it was that much smoother than what I already had.

Am I wasting my time trying to get smooth scrolling text in a windows forms
uisng GDI
app and if so why !! If it is possible is there any C# .Net 2.0 code
floating around I could look at ?

I was thinking of having a stab at some Direct X ! Is this the way to go ?

Thanks.

Jon
Apr 24 '07 #2

This discussion thread is closed

Replies have been disabled for this discussion.