Active Property
Home Page (Objects) | Overview | FAQ | Reference
Applies to: Application object, Document object, TextDocument object, TextWindow object, Window object
Gets or sets whether Developer Studio, a document, or a window is active.
Syntax
object**.Active** [=boolean]
Parameters
object
An expression that evaluates to one of the objects in the Applies To list above. When you access the Active property of the Application object, you can omit object because the name of the Application object is implied when you access its properties and methods.
boolean
A Boolean that sets the state of the object. Possible values are:
True Activates the object.
False Deactivates the object.
Return Values
The Active property returns one of the following values:
True The object is active.
False The object is not active.
Remarks
The Active property has the Boolean type.
Example
The following example browses all open documents for the file MyFile.Cpp. If the file is found, it becomes the active document.
Dim myDocument
For Each myDocument in Application.Documents
If myDocument.Name = "MyFile.Cpp" Then
myDocument.Active = True
End If
Next