Hello all,
I am using TS3.5 with CVI8.0.1 and the "full-featured" CVI operator interface that ships with TS3.5...
I would like to force the user to have to answer a confirm pop-up prior to being able to exit the application before the "ApplicationMgr_OnExitApplication ()" is called...
Naturally, this event happens when the menu "File >> Exit" is selected or when the main window close control (the "X") is clicked on. I want to do this because there are things I'd like to clean-up and close-down when the user plans to exit. I thought it would be as simple as placing the body of that callback inside a simple ConfirmPopup (). So that's the first thing I tried.
However, at run-time, when I select the menu "File >> Exit" I get the error popup: "Application is not running (TSUI.ApplicationMgr) Unexpected Operating System Error.[Error Code: - 17501]". I disabled the Window-Close in the main window for now, just so that I could concentrate on the menu item that exits.
So, my next step was to crawl into the "RebuildMenuBar" code and learn how to create a custom version of the enumerated "TSUIConst_CommandKind_DefaultFileMenu_Set", or at the least, understand the "CommandKinds Enumeration" in the TestStand Bookshelf and the TestStand Help file to even see if this was the proper way to go...
So after looking at it for a while, I got to thinking that this looked like a long-winded solution to something that should be very straightforward to implement (in CVI-speak).
I think I must be doing something wrong here. Is there a different ActiveX event I should be registering to a new callback function that I need to create?
Any help would be appreciated,
Jumper Bones
--
To whom it may concern: My alias is also my nickname, I've had it since I was a (very) skinny basketball-playing teen. OK, so I've got a 38 inch waist now, but my hometown friends haven't shaken that appellation for me. I trust that you will someday be OK with that alias, as I have been with that nickname.