Export (0) Print
Expand All
ID
Top
Expand Minimize

Visible Property

Visual Studio .NET 2003

Sets or returns the visibility of a window.

[Visual Basic .NET]
Public Property Visible() As Boolean
[Visual Basic 6]
Property Get Visible() As Boolean
Property Let Visible( _
   ByVal NewValue As Boolean _
) 
[C++]
HRESULT __stdcall get_Visible(
   /* [out, retval] */ VARIANT_BOOL* retVal
);
HRESULT __stdcall put_Visible(
   /* [in] */ VARIANT_BOOL NewValue
);
[C#]
public bool Visible {get; set;}
[JScript .NET]
public function get Visible() : Boolean
public function set Visible(
   NewValue : Boolean
)

Parameters

Value
Required. True means the window is visible, False means it is hidden.

Return Value

True if the window is visible, False if not.

Remarks

The Find/Replace utility will not search non-visible windows in open documents, even if the document associated with the window is still open.

Example

Sub VisibleExample()
   Dim Frame As Window
   Dim w1 As Window = DTE.Windows.Item(Constants.vsWindowKindSolutionExplorer)
   Dim w2 As Window = DTE.Windows.Item(Constants.vsWindowKindOutput)

   ' Create a linked window frame and dock together the Solution Explorer 
   ' and Ouput windows together inside it.
   Frame = DTE.Windows.CreateLinkedWindowFrame(w1, w2, vsLinkedWindowType.vsLinkedWindowTypeDocked)
   MsgBox("Total number of windows in the linked window frame: " & Frame.LinkedWindows.Count)

   ' View some window properties.
   MsgBox("Window ObjectKind property value: " & Frame.ObjectKind)
   MsgBox("Window Caption: " & Frame.Caption)

   ' Resize the entire linked window frame.
   Frame.Width = 500
   Frame.Height = 600
   Frame.Left = 100
   Frame.Top = 100
   Frame.Visible = True
   MsgBox("Frame height, width, and position changed.")
End Sub

See Also

Applies To: Window Object

Show:
© 2014 Microsoft