Format.Activate Method

ClosedDescription

Makes a document the active document by assigning focus to its window.

ClosedSyntax

Format.Activate

ClosedRequirements

Version

BarTender 6.00 or higher

Edition

Automation, Enterprise

ClosedVB.NET Example

'Declare a BarTender application variable

Dim btApp As BarTender.Application

'Declare two BarTender document variables

Dim btFormat1 As BarTender.Format

Dim btFormat2 As BarTender.Format

'Create a new instance of BarTender

btApp = New BarTender.Application

'Set the BarTender application visible

btApp.Visible = True

'Open a BarTender document

btFormat1 = btApp.Formats.Open("c:\Format1.btw", False, "")

'Open a second BarTender document

btFormat2 = btApp.Formats.Open("c:\Format2.btw", False, "")

'Set focus to the first opened document

btFormat1.Activate()

'End the BarTender process

btApp.Quit(BarTender.BtSaveOptions.btDoNotSaveChanges)

ClosedC# Example

// Declare a BarTender application variable

BarTender.Application btApp;

// Declare two BarTender document variables

BarTender.Format btFormat1;

BarTender.Format btFormat2;

// Create a new instance of BarTender

btApp = new BarTender.Application();

// Set the BarTender application visible

btApp.Visible = true;

// Open a BarTender document

btFormat1 = btApp.Formats.Open("c:\\Format1.btw", false, "");

// Open a second BarTender document

btFormat2 = btApp.Formats.Open("c:\\Format2.btw", false, "");

// Set focus to the first opened document

btFormat1.Activate();

// End the BarTender process

btApp.Quit(BarTender.BtSaveOptions.btDoNotSaveChanges);

Related Topics