07-26-2010 10:16 PM
Hi all,
I'm developing a mobile application for Windows Mobile 5 using LabVIEW 2009 SP1 and the Mobile Module. After coming to terms with many of the limitations, I've got a simple menu driven interface working. The interface consists of a transparent 240x320 picture control to which I draw the menu item text using the Draw Text At Point VI, along with an icon representing the menu item. Behind this picture control is a second picture control which contains the selection graphic to show which menu item is highlighted.
The problem I'm now facing is an annoying screen flicker every time a control property for the selection graphic is set. Specifically when the user navigates the menu using the up/down arrows on the device, the menu selection on the screen is moved using the Position->Top property to move it to highlight the correct menu item. Whenever this property is set, the whole screen flashes white and redraws.
Presumably this is due to the top level picture control being redrawn when the underlying control is updated (which makes perfect sense), but I wish it wasn't so noticeable.
So a couple of questions:
1. Is there any way to enable double-buffering of the display from the Mobile Module or on the device itself?
2. Is my picture control behind picture control design flawed? I would use a system listbox for the menu but it's a bit ugly, and doesn't support icons/symbols under the Mobile Module. Other limitations of the Module Mobile (like string controls that can't have transparent backgrounds) led me to use picture controls as the best overall solution.
Cheers,
Michael
07-27-2010 12:52 AM - edited 07-27-2010 12:54 AM
Does the 'Defer panel updates' property exist on the PDA platform?
Set this to true before you redraw the 'selection' and false afterwards.
Maybe it's better to just use one picture control?
You allready got the logic to deal with stylus clicks.
Ton
07-27-2010 01:46 AM
Thanks for the quick response.
Unfortunately accessing the front panel reference and its properties isn't supported.
As the device will be used in an industrial environment amongst multiple people, the chances of the stylus going missing are quite high. So I've designed the input around the available physical buttons and am avoiding stylus input.
07-27-2010 05:16 PM
Overlaying controls, in mobile module or otherwise, frequently results in flicker. I'm not aware of any way to work around this particular behavior beyond using the listbox. I'll agree with you it's not the prettiest manifestation, but it should minimize the flickering.
07-28-2010 10:43 PM
Thanks everyone for the feedback.
I just did a day's worth of testing using C# and .NET for Windows Mobile (in Visual Studio 2005) and was able to reproduce the same interface without any flickering issues. Not having to poll the device's hardware buttons is also a positive 🙂
The key is to override the main form's OnPaintBackground() method.
From "Crafting Smartphone User Interfaces Using .NET Compact Framework":
This method needs to be over ridden to prevent the OS from repainting the background each time the user navigates the ListView, causing flicker. If you don't need a background then just override this method but provide no implementation.
So it looks like I'll be doing things in C# for this project. As the mobile device won't be used for data acquisition, the Mobile Module isn't a necessity. I just hope .NET's serial functionality is as good as LabVIEW's!
09-23-2010 11:07 AM
Hello,
I have equivalent problems on my PDA application and I manage to solve them.
- Do you use the visible property of LabVIEW in the list of your control properties ? In this case (even if in the LabVIEW Help it's not recommended) try to use the VI "Show or Hide Control.vi" in .../vi.lib/PDA
- maybe you need to have a temporisation after each "graphical" property update
09-28-2010 07:40 AM
I have seen this happen when using the visible property node. I have to use this node within my application but only poll it once (to see if a certain state is true). It does not get called on subsequent loops and therefore I do not get any flicker.
I do however get flicker when I perform a Bluetooth write function. This never used to happen in LV8.5.1 but does happen in LV2009 & 2010.
Perhaps if you have 8.5 you could try to comile your code to see if it resolves the issue.