Reputation: 21
I'm using Win CE 13 to display some information on a fueling panel using the Windows.Forms library.
For example a Windows.Forms.Label object is used to display the current time and another to display the amount of pumped fluid. Now these labels' texts are assigned every 500ms which leads to a kind of annoying flickering every other second, especially if the label is rather big.
Unfortunately the Control.DoubleBuffered property isn't available on WinCE 2013 which was my only guess to solve the problem.
Maybe you can give some advice on how to avoid the flickering or at least reduce it to a minimum.
Greets P.W
Upvotes: 1
Views: 255
Reputation: 21
Referring to Alan's answer in this post : https://stackoverflow.com/a/24294229/5546999 it was quite simple to write a wrapper class for the System.Windows.Forms.Label and enable DoubleBuffering with Alan's provided code. Since the label actually just contains a string as information the Graphics.DrawString method is absolutely sufficient. The Font can be retrieved by the wrapper class itself since it inherits from System.Windows.Forms.ScrollableControl. Due to that the Font can be set in the properties as if it's a 'normal' label object.
Upvotes: 1