12-09-2016 04:06 PM
Hi
Can someone find a reason why setting ATTR_CLOSE_ITEM_VISIBLE panel attribute to 0/1 causes the panel to blink?...Attached a small program.
I use CVI 2012 SP1. Windows 7 64.
I could only find this on the web: http://natinst.public.labwindows-cvi.general.narkive.com/Dp6nIHb2/setting-close-control-causes-scree...
12-12-2016 10:50 AM
Hi Ramy,
Changing the ATTR_CLOSE_ITEM_VISIBLE attribute causes the ATTR_SYSTEM_WINDOW_HANDLE to be invalid and the window is recreated everytime.
When the delay function is used, it prevents the window to be recreated; hence the blink. If you simply set the attribute to "0" without the delay and don't set it back to "1" again, the red X that closes the window will be disable without the window blinking.
Can you let me know why you want to set the attribute to 0, then 1 again?
12-13-2016 05:35 AM
Hi ren,
Thanks for your answer.
The delay in my program was just for the example...
I encounter the problem anytime I set this attribute, even once.
Here is a second example - set the attr only once, without a delay. I'll appretiate your help.
Ramy
12-14-2016 09:35 AM
Hi Ramy,
Thanks for the code! I run it on my side and it seems to work fine. The X button of the panel window is dimmed when the switch is ON.
I am running LabWindows/CVI 2015. Can you download the 2015 version and see if the same behaviour presists?
12-16-2016 09:31 AM
Hi Ren
1) When you say "it seems to work fine" do you mean it is not blinking?
When I turn the switch on/off the panel is blinking.
2) I don't have a license for CVI 2015.
Ramy
12-19-2016 12:41 PM
Hi Ramy,
Yes, when I ran you code, the panel did not blink when I toggled the switch.
NI software come with a 7 day evaluation period. This behaviour might be isolated to the 2012 version.To find out, just install CVI 2015 for troubleshooting.
12-20-2016 07:01 PM
Hi Ren
I've just tried my example in CVI 2013, and the panel blinks.
Anyway, CVI 2015 is not a solution for me right now. Thanks.