Closes the A-Shell application.
Syntax
Application.Quit(ForceClose)
Parameters
ForceClose
A Boolean value indicating how the A-Shell application is to be terminated.
A False value indicates a ‘clean’ shutdown. This is performed by sending a WM_CLOSE message to the A-Shell window. If A-Shell is at the command prompt, then the window will close. Otherwise the A-Shell quit dialog will be displayed.
A True value indicates an immediate shutdown. This forces the A-Shell to exit immediately following execution of the current AlphaBASIC statement. In most cases this will provide an immediate termination, except where the current statement is a lengthy XCALL – e.g. an XCALL BASORT call.
Remarks
Once the A-Shell application is terminated, it cannot be reactivated with the Activate method. Instead a new Application object instance must be created, as demonstrated by the following Visual BASIC code sample:
Dim oApplication as
ASHW32Lib.Application
…
oApplication.Quit True
Set oApplication =
Nothing
Set oApplication = New
ASHW32Lib.Application
oApplication.Activate
…
The only method or property which is valid after use of the Quit method is the Active property. This will return False.
Note that use of a forced shutdown could result in corrupted data if the interrupted application is accessing data files at the time. Forced shutdown is only recommended if it is known that any running application is not writing to disk.