Quantcast
Channel: LabWindows/CVI topics
Viewing all articles
Browse latest Browse all 5339

Pause Button

$
0
0

I am creating a test procedure that runs when the user clicks a "start" button on the user interface.  However, I would like to create a pause button, on the same user interface, that the user can click while the test is running. 

 

Currently, when the user clicks the start button, the functions I have made are called and the user interface is "locked" up, since the program is running in its sequential order, and any click events to the interface will not happen until AFTER the test procedure has occurred.  I am trying to figure out how to make the user interface run separately from the functions that it actually calls.

 

I have stumbled across the idea of making threads.  I do not know if that is the solution, but I have been messing around with the CmtScheduleThreadPoolFunction(); function, trying to make a function become its own thread.  

 

If the thread idea works out, I thought I could utilize the SuspendThread(); and ResumeThread(); functions.  I figured once the user could click the pause button in the middle of a test procedure, these functions could be called relative to the state of a toggle button.

 

Before I beat my face into the wall more than I need to, I thought I would see if any better minds (which I'm sure there are many) have had experience with this and know a potential direction that I should steer towards.

 

Thanks,

Alex


Viewing all articles
Browse latest Browse all 5339

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>