LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

How to launch/show panel without suing blocking functions like RunUserInterface()?

Solved!
Go to solution

Good afternoon,

I developed a DLL in LabWindows/CVI containing new step types that i use in TestStand. One of those step types (in running mode, post substep) launches a panel which must remain active through all the test sequence allowing the normal procedure of steps after calling that specific step.

I cannot use a blocking function like RunUserInterface() since it doesn't return until QuitUserInterface() is called.

Regards,

Alejandro 

0 Kudos
Message 1 of 3
(2,700 Views)
Solution
Accepted by AlePinto

A couple of ideas:

 

  • Set up a loop that calls ProcessSystemEvents and then sleeps.
  • Create a function in a new thread using CmtScheduleThreadPoolFunction and call RunUserInterface from this thread.
Message 2 of 3
(2,675 Views)

Thanks for your response richferrara!

Finally, i implemented a secondary thread which runs RunUserInterface function as you mention but, to finish its execution programmatically or by pressing "Quit" button of a panel loaded in secondary thread, i used PostDeferredCallToThread to call QuitUserInterface in that secondary thread, whose ID is got by CmtGetCurrentThreadID.

Regards, 

Alejandro

 

0 Kudos
Message 3 of 3
(2,595 Views)