LicenseServer.IsConnected Property

ClosedDescription

Returns the status of BarTender's connection to the Seagull License Server. Read-only.

ClosedSyntax

LicenseServer.IsConnected

ClosedRequirements

Version

BarTender 6.20 or higher

Edition

Automation, Enterprise Automation

ClosedRemarks

LicenseServer.IsConnected returns a boolean value. If true, BarTender is connected to the Seagull License Server. If false, BarTender is not connected to the Seagull License Server.

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 SLS

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 SLS

if(btApp.LicenseServer.IsConnected == true)

{

MessageBox.Show("Connected");

}

else

{

MessageBox.Show("Not Connected");

}

// End the BarTender process

btApp.Quit(BarTender.BtSaveOptions.btDoNotSaveChanges);