Windows Form and Controls delay for update (lag animation of contr

  • Thread starter Thread starter Danny Gilbert
  • Start date Start date
D

Danny Gilbert

Hi !

I build a WinApp C# software under Windows CE 6.0. It is a GUI and the
system works in Kiosk mode. I have some issue with all windows controls in my
form.

I have some scrolling bar, button, led button, text box, etc.
When I push too many times a button, It shows my button turning on and off
(red or green) but after some moment, the button continues to "toggle" even
if I have finish to push on it. If I work with my GUI in "slow motion",
everything is fine. If I ask too much "process from Windows", I see lagging
or flicking.

I have the same issue with scrolling bar. I have a background process that
update a new position of the scroller at each 100ms (I have a log of this
event at each 100ms and it works) but the scrolling bar does not "react"
properly.

NOTE: I use DELEGATE and INVOKE() functions to "update" properties of my
control. I do the same thing then all example I found on the web and in my
book.

Is it normal that my controls "show" some "lagging" in the animation ?
Can it be due to the processor "cpu power" or memory of my system ?

My system is a : Geode LX800 AMD CPU with 512MB of ram.
 
We don't really have any way of telling you what your problem may be, but
think about some of your things critically and I think perhaps, you'll
adjust your expectations. For example, what was a scrollbar designed to do?
Take user input in the form of taps/clicks in various parts of its body,
update a value based on the current value and the place where the tap
occurred, and update the appearance of the control to match the new value.
Now, there's almost zero chance that a person is going to click on something
ten times a second, as your code is trying to do, so what you're asking of
the scroll bar is inconsistent with its intended use. Certainly, if you
queue up a bunch of UI operations, Windows CE will eventually do them, just
ask desktop Windows will catch up if you do some operations while it's busy
doing something else.

So, the real issues are: 1) are you using controls for the right things? If
you just want to show a green box or a red box, you don't need all of the
stuff that a button gives you and just drawing a green or red box yourself
might make more sense, and 2) is what you're doing sensible at all? If you
just want to show, say, the progress of some process, you don't need to
update it ten times per second.

Paul T.
 
Back
Top