LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

what does process system events do?

If I have code I've created with CVI running under a GUI-based VB (or some other Microsoft framework let's say) application, if I process system events in the CVI code (let's say it's a DLL) will that allow GUI events in the non-CVI application to get processed?  Will the non-CVI GUI stay responsive if I periodically call ProcessSystemEvents() ?  Do I have to call ProcessSystemEvents at all in this case? 

Maybe I should post this on the VB board too...

Thanks in advance.

Menchar
0 Kudos
Message 1 of 2
(4,472 Views)
Hi menchar,

ProcessSystemEvents in a loop is basically the good old Windows message pump.  Calling that function forces CVI to check the Windows message queue to see if there is events that that needs to be processed.  If there are events, it dispatches the message to the appropriate message handler.  As long as the VB events are in the same thread as the call to ProcessSystemEvents, I would expect that VB events would also get processed and disptached to their handlers. 

Honestly if I was in your position, I would also make calls to DoEvents as well to ensure that all VB events are getting processed. If you find that ProcessSystemEvents does process all your events, then great. If not, then you would need to call DoEvents in your code.

Best Regards,
Jonathan N.
National Instruments
0 Kudos
Message 2 of 2
(4,434 Views)