Bagikan melalui


IVsWindowFrame.CloseFrame Method

Closes a window.

Namespace:  Microsoft.VisualStudio.Shell.Interop
Assembly:  Microsoft.VisualStudio.Shell.Interop (in Microsoft.VisualStudio.Shell.Interop.dll)

Syntax

'Declaration
Function CloseFrame ( _
    grfSaveOptions As UInteger _
) As Integer
int CloseFrame(
    uint grfSaveOptions
)
int CloseFrame(
    unsigned int grfSaveOptions
)
abstract CloseFrame : 
        grfSaveOptions:uint32 -> int
function CloseFrame(
    grfSaveOptions : uint
) : int

Parameters

Return Value

Type: System.Int32
If the method succeeds, it returns S_OK. If it fails, it returns an error code.

Remarks

COM Signature

From vsshell.idl:

HRESULT IVsWindowFrame::CloseFrame(
   FRAMECLOSE grfSaveOptions
);

If the frame being closed sites a document window, the user is prompted by the UI to save changes and then close the window. If the frame sites a tool window, the tool window is hidden without saving any data or prompting the user.

.NET Framework Security

See Also

Reference

IVsWindowFrame Interface

Microsoft.VisualStudio.Shell.Interop Namespace