Close Open Systems Sessions Gracefully
In This Topic
You can prevent users from closing sessions until certain conditions are met.
This sample requires users to close an application before they terminate the session.
This sample applies only to Open Systems terminals.
To run this sample
- Create a new VT terminal session and enter "demo:UNIX" in the Host name / IP Address field.
- In the Visual Basic Editor Project window, copy the code into the View object module.
- On the first screen, enter any credentials to log in.
- Try to close the session. (This opens the message box that indicates you need to close the application.)
- On the command prompt, enter "EXIT" to close the demo application and then close the session.
Concepts
This macro handles the Closing event to check for a user exit command. If it finds the command in the display memory, the event is set to true and the application closes. If not, the event is cancelled, and the user is not allowed to close the session.
See Also