LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

PDA screen flicker when updating control properties

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.

 

19931i61AED9EAC9772AE4

 

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




Certified LabVIEW Architect
Unless otherwise stated, all code snippets and examples provided
by me are "as is", and are free to use and modify without attribution.
0 Kudos
Message 1 of 7
(4,582 Views)

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

Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
Nederlandse LabVIEW user groep www.lvug.nl
My LabVIEW Ideas

LabVIEW, programming like it should be!
0 Kudos
Message 2 of 7
(4,574 Views)

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.




Certified LabVIEW Architect
Unless otherwise stated, all code snippets and examples provided
by me are "as is", and are free to use and modify without attribution.
0 Kudos
Message 3 of 7
(4,563 Views)

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.

Verne D. // Software R&D // National Instruments
0 Kudos
Message 4 of 7
(4,539 Views)

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 🙂

 

20195iF675BAAA3584E858

 

The key is to override the main form's OnPaintBackground() method.

 

From "Crafting Smartphone User Interfaces Using .NET Compact Framework":

OnPaintBackground

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!




Certified LabVIEW Architect
Unless otherwise stated, all code snippets and examples provided
by me are "as is", and are free to use and modify without attribution.
0 Kudos
Message 5 of 7
(4,520 Views)

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

 

Cordialement,

Mathieu O.
Certified LabVIEW Architect - CLA (2013)
0 Kudos
Message 6 of 7
(4,334 Views)

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.

0 Kudos
Message 7 of 7
(4,289 Views)