09-27-2014 04:42 PM
I would like the dialog box to ask the user to select "OK" or "Cancel" if no activity within 10 seconds the dialog box goes away.
Thanks.
09-27-2014 04:51 PM
Have the dialog box VI include an event structure. An event case each for value change on OK and Cancel. And a third timeout event set for 10 seconds.
09-27-2014 06:08 PM
I am not sure how to draw what you are saying?
09-27-2014 06:34 PM
You can use an undcoumented Windows function (assuming you're using Windows). It will display a message box for a fixed time ( a value of 0 means it will not disappear). I posted a zip file of code that calls this function in this thread:
09-27-2014 06:42 PM
@Matthew_Kelton wrote:
You can use an undcoumented Windows function (assuming you're using Windows). It will display a message box for a fixed time ( a value of 0 means it will not disappear). I posted a zip file of code that calls this function in this thread:
I'm not sure that tying the code to a particular platform is the best way to go.
Plus, it just seems to be way easier to use an event structure with a timeout.
09-27-2014 07:26 PM
In 15 years, I have never ported my code to a different platform, nor has anyone tried to port my code to a different platform. While my case is not indicative of everyone's, the insistence of platform independence is widely overblown since I dare say most of us will never see code moved.
What's easier - trying to figure out how to write your own code (especially if it is something you plan to reuse and especially if you are a more inexperienced programmer), or using a canned API function that is already ready to be dropped into your code, offers additional functionality that isn't easily available in LabVIEW? Not to mention that the message box looks like every single message box a user is used to seeing on the platform. It supports the standard Windows sounds for a message, the standard Windows icons can be included, and modality beyond LabVIEW is supported as well.
@billko wrote:
@Matthew_Kelton wrote:
You can use an undcoumented Windows function (assuming you're using Windows). It will display a message box for a fixed time ( a value of 0 means it will not disappear). I posted a zip file of code that calls this function in this thread:
I'm not sure that tying the code to a particular platform is the best way to go.
Plus, it just seems to be way easier to use an event structure with a timeout.
09-27-2014 07:26 PM
09-27-2014 08:07 PM
@rico_bravo wrote:
I would like the dialog box to ask the user to select "OK" or "Cancel" if no activity within 10 seconds the dialog box goes away.
Thanks.
You also need to define what it should return if it times out.
I would also go wit the suggestion of a dialog subVI with an event structure. Simple enough!