Compartilhar via


Document.NewWindow Method

Definition

Creates a new window in which to view the document.

public:
 EnvDTE::Window ^ NewWindow();
public:
 EnvDTE::Window ^ NewWindow();
EnvDTE::Window NewWindow();
[System.Runtime.InteropServices.DispId(125)]
public EnvDTE.Window NewWindow ();
[<System.Runtime.InteropServices.DispId(125)>]
abstract member NewWindow : unit -> EnvDTE.Window
Public Function NewWindow () As Window

Returns

A Window object.

Attributes

Examples

Sub NewWindowExample()  
    ' Before running, create a text file or other document window.  
    Dim docs As Documents  
    Dim doc As Document  
    Dim win As Window  
    docs = documents  
    docs.SaveAll()  
    doc = dte.ActiveDocument  
    win = doc.NewWindow()  
    doc.Save("c:\temp\docsave.txt")  
    msgbox(doc.Selection().text)  
    docs.CloseAll(vsSaveChanges.vsSaveChangesPrompt)  
End Sub  

Remarks

The new window created is an MDI child document window.

Applies to