LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Why are you supposed to put ProcessSystemEvents before a HideDisplay call?

I remeber that your Message Board told me to put a call to ProcessSystemEvents() before a HideDisplay call. Does anyone know why?
0 Kudos
Message 1 of 6
(4,053 Views)
Hello,

I was not able to find any built-in function in CVI called HideDisplay. Is it possible that this is a function that you or someone in your company wrote? With more information about the function we might be able to better answer you question.

There is a built-in function called HidePanel. I was not able to find any posts on these forums suggesting that you call ProcessSystemEvents before a call to HidePanel. Do you have a link to this suggestion? Reading the suggestion may also make it easier to explain the suggestion.

If you are using this HidePanel function I cannot think of any reason why you would need to call ProcessSystemEvents first. Have you seen any undesireable behavior when you skip the call to ProcessSystemEvents before calling HidePanel?

Scott Y
NI
0 Kudos
Message 2 of 6
(4,036 Views)
I meant Hide Panel. I remember that someone from NI told me that there was a bug in LabWindows CVI and that to get around this you need to call ProcessSystemEvents before a Hide Panel. It had something to do with memory management. I was having problems using the Lab Windows thread safe queues. It looks like Lab Windows was deallocating a message from the thread safe queue before I could deallocate the message. I ended up fixing the problem by both adding ProcessSystemEvents calls before the Hide Panel calls and also removing some ProcessSystemEvents calls in functions that take a long time processing. I was wondering why this works because I can't remember the details.
Thanks,
Donna
0 Kudos
Message 3 of 6
(4,034 Views)
Hi Donna, This issue is related to the Windows 9x/ME operating systems. If you use Windows NT/2000/XP there should be no issues with calling the HidePanel function. Scott Y NI
0 Kudos
Message 4 of 6
(4,012 Views)

Can you tell me what the issue is because I don't remember specifically?  By the way, I am running using XP and by adding the ProcessSystemEvents call, it solved my memory deallocation problem.

Thanks,

Donna

0 Kudos
Message 5 of 6
(3,992 Views)
Hello donna,
 
The issue was related to repeatedly hiding and displaying a panel in a loop on Windows 95/98/ME systems.  This behavior could result in losing system resources.  This issue should not be a problem on Window XP machines, and I was unable to reproduce the problem on this OS.  A workaround for the issue was to calling ProcessSystemEvents before the call to HidePanel takes place, or activating a second panel before hiding the original panel.
 
Hope this helps.
Wendy L
LabWindows/CVI Developer Newsletter
0 Kudos
Message 6 of 6
(3,972 Views)