LicenseServer.IsConnected Property

ClosedDescription

Returns the status of the connection that BarTender has to the BarTender Licensing Service. Read-only.

ClosedSyntax

LicenseServer.IsConnected

ClosedRequirements

Version

BarTender 6.20 or higher

Edition

Automation, Enterprise

ClosedRemarks

LicenseServer.IsConnected returns a Boolean value. If true, BarTender is connected to the BarTender Licensing Service. If false, BarTender is not connected to the BarTender Licensing Service.

ClosedVB.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

'Check to see if BarTender is connected to the BarTender Licensing Service

If btApp.LicenseServer.IsConnected = True Then

MessageBox.Show("Connected")

Else

MessageBox.Show("Not Connected")

End If

'End the BarTender process

btApp.Quit(BarTender.BtSaveOptions.btDoNotSaveChanges)

ClosedC# 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;

// Check to see if BarTender is connected to the BarTender Licensing Service

if(btApp.LicenseServer.IsConnected == true)

{

MessageBox.Show("Connected");

}

else

{

MessageBox.Show("Not Connected");

}

// End the BarTender process

btApp.Quit(BarTender.BtSaveOptions.btDoNotSaveChanges);