LicenseServer.Connect Method

ClosedDescription

Connects BarTender to its Seagull License Server and returns true, meaning success, or false, meaning failure.

ClosedSyntax

LicenseServer.Connect

ClosedRequirements

Version

BarTender 6.20 or higher

Edition

Automation, Enterprise Automation

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 SLS

If btApp.LicenseServer.Connect = 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.Connect() == true)

{

MessageBox.Show("Connected");

}

else

{

MessageBox.Show("Not Connected");

}

// End the BarTender process

btApp.Quit(BarTender.BtSaveOptions.btDoNotSaveChanges);