| Application.Quit Method | 
 Description
Description
        Quits BarTender application.
 Syntax
Syntax Application.Quit(BtSaveOptions)
Where BtSaveOptions determines whether the open BarTender documents will be saved.
The BtSaveOptions parameter (optional in VB.NET, but required in C#) can be set to any one of the following:
| Constant | Value | Description | 
|---|---|---|
| btPromptSave | 0 | Will prompt the user to save changes if needed. (default) | 
| btDoNotSaveChanges | 1 | Do not save any changes. | 
| btSaveChanges | 2 | Save all changes. Do not prompt the user. | 
 Requirements
Requirements
        | Version | BarTender 6.00 or higher | 
| Edition | Automation, Enterprise | 
 Remarks
Remarks
        The Quit method quits and exits the BarTender application. All opened documents are either saved or not saved based on the BtSaveOptions constant.
This call is asynchronous. It can return before the BarTender application terminates or any files are saved. When you want a synchronous save, use the Format.Save method instead.
 VB.NET Example
VB.NET Example
        'Declare a BarTender application variable
Dim btApp As BarTender.Application
'Create a new instance of BarTender
btApp = New BarTender.Application
'Set the BarTender application visible
btApp.Visible = True
'End the BarTender process
btApp.Quit(BarTender.BtSaveOptions.btDoNotSaveChanges)
 C# Example
C# Example
        // Declare a BarTender application variable
BarTender.Application btApp;
// Create a new instance of BarTender
btApp = new BarTender.Application();
// Set the BarTender application visible
btApp.Visible = true;
// End the BarTender process
btApp.Quit(BarTender.BtSaveOptions.btDoNotSaveChanges);
Related Topics