LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

setting panel attribute ATTR_CLOSE_ITEM_VISIBLE causes panel to blink

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...

0 Kudos
Message 1 of 7
(3,727 Views)

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?

Ren H.
Applications Engineering
National Instruments
0 Kudos
Message 2 of 7
(3,662 Views)

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

Download All
0 Kudos
Message 3 of 7
(3,650 Views)

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? 

Ren H.
Applications Engineering
National Instruments
0 Kudos
Message 4 of 7
(3,636 Views)

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

0 Kudos
Message 5 of 7
(3,626 Views)

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.

 

 

Ren H.
Applications Engineering
National Instruments
0 Kudos
Message 6 of 7
(3,610 Views)

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.

0 Kudos
Message 7 of 7
(3,597 Views)