LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Sleep Function and Binary Switch Icon Update

Solved!
Go to solution

Hello,

 

I'm new to LabWindows/CVI and I have a question that might be very simple to answer.

 

When a sleep function is utilized inside a binary switch, how can I get the icon on the main panel to update as soon as I click on the switch, instead of it changing the status only after the sleep function is over?

 

In other words, if I have a switch to which I apply a delay of x seconds (through the sleep function), when I run the program and I click on the switch, its status changes after x seconds. Instead I would like it to change immediatly, and then wait for x seconds before the action of the switch take place...

 

I appreciate any help. Thanks!

0 Kudos
Message 1 of 3
(3,751 Views)
Solution
Accepted by topic author andreag

Just before the sleep call, add: ProcessDrawEvents();

 

JR

0 Kudos
Message 2 of 3
(3,746 Views)
Thanks a lot!
0 Kudos
Message 3 of 3
(3,740 Views)