Window インターフェイス

Window オブジェクトは、環境内にあるウィンドウを表します。

名前空間:  EnvDTE
アセンブリ:  EnvDTE (EnvDTE.dll 内)

構文

'宣言
<GuidAttribute("0BEAB46B-4C07-4F94-A8D7-1626020E4E53")> _
Public Interface Window
[GuidAttribute("0BEAB46B-4C07-4F94-A8D7-1626020E4E53")]
public interface Window
[GuidAttribute(L"0BEAB46B-4C07-4F94-A8D7-1626020E4E53")]
public interface class Window
[<GuidAttribute("0BEAB46B-4C07-4F94-A8D7-1626020E4E53")>]
type Window =  interface end
public interface Window

Window 型で公開されるメンバーは以下のとおりです。

プロパティ

  名前 説明
パブリック プロパティ AutoHides ツール ウィンドウを非表示にできるかどうかを取得または設定します。
パブリック プロパティ Caption ウィンドウのタイトルを取得または設定します。
パブリック プロパティ Collection このプロパティをサポートしている Window オブジェクトを含んでいるコレクションを取得します。
パブリック プロパティ ContextAttributes ContextAttributes コレクションを取得します。このコレクションを使用すると、オートメーション クライアントは、[ダイナミック ヘルプ] ウィンドウで現在選択されている項目に新しい属性を追加し、追加した属性のコンテキスト ヘルプを表示できます。
パブリック プロパティ Document 項目に関連付けられている Document オブジェクトがあれば、そのオブジェクトを取得します。
パブリック プロパティ DocumentData インフラストラクチャ。 マイクロソフト内部でのみ使用します。
パブリック プロパティ DTE トップレベルの機能拡張オブジェクトを取得します。
パブリック プロパティ Height ウィンドウの大きさをピクセル単位で示す値を取得または設定します。
パブリック プロパティ HWnd インフラストラクチャ。 マイクロソフト内部でのみ使用します。
パブリック プロパティ IsFloating ツール ウィンドウをフローティング ウィンドウとして他のウィンドウより手前に表示するかどうかを示す値を取得または設定します。
パブリック プロパティ Kind ウィンドウの種類を示す文字列を取得します。
パブリック プロパティ Left オブジェクトの内側の左端とコンテナーの左端との間隔を取得または設定します。
パブリック プロパティ Linkable ツール ウィンドウが別のツール ウィンドウとドッキングできるかどうかを示す値を取得または設定します。
パブリック プロパティ LinkedWindowFrame ウィンドウが含まれているウィンドウの枠を表す Window オブジェクトを取得します。
パブリック プロパティ LinkedWindows リンク ウィンドウの枠に含まれるすべてのリンク ウィンドウのコレクションを取得します。
パブリック プロパティ Object 実行時に名前でアクセスできるオブジェクトを取得します。
パブリック プロパティ ObjectKind Window オブジェクトの型 (ウィンドウに含まれるツールを表す GUID 文字列) を取得します。
パブリック プロパティ Project Window オブジェクトに関連付けられている Project オブジェクトを取得します。
パブリック プロパティ ProjectItem Window オブジェクトに関連付けられている ProjectItem オブジェクトを取得します。
パブリック プロパティ Selection Window オブジェクトの現在の選択項目を表すオブジェクトを取得します。
パブリック プロパティ Top オブジェクトの内側の上端とコンテナーの上端との間隔を取得または設定します。
パブリック プロパティ Type インフラストラクチャ。 マイクロソフト内部でのみ使用します。
パブリック プロパティ Visible ウィンドウの可視性を取得または設定します。
パブリック プロパティ Width ウィンドウの幅を文字単位で取得または設定します。
パブリック プロパティ WindowState ウィンドウの状態 (最小化、通常など) を取得または設定します。

このページのトップへ

メソッド

  名前 説明
パブリック メソッド Activate フォーカスを現在の項目に移動します。
パブリック メソッド Attach インフラストラクチャ。 マイクロソフト内部でのみ使用します。
パブリック メソッド Close 開いているドキュメントを閉じ、オプションでドキュメントを保存します。またはウィンドウを閉じ、破棄します。
パブリック メソッド Detach インフラストラクチャ。 マイクロソフト内部でのみ使用します。
パブリック メソッド SetFocus インフラストラクチャ。 マイクロソフト内部でのみ使用します。
パブリック メソッド SetKind インフラストラクチャ。 マイクロソフト内部でのみ使用します。
パブリック メソッド SetSelectionContainer プロパティ ウィンドウがアクティブになっているときに、このウィンドウで設定オブジェクトをアクティブにできます。
パブリック メソッド SetTabPicture ツール ウィンドウに表示するピクチャを設定します。

このページのトップへ

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

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

   ' Add another tool window, the Command window, to the frame with 
   ' the other two.
   Frame.LinkedWindows.Add(w3)
   MsgBox("Total number of windows in the linked window frame: " & Frame.LinkedWindows.Count)

   ' Resize the entire linked window frame.
   Frame.Width = 500
   Frame.Height = 600
   MsgBox("Frame height and width changed. Now changing Command window height.")

   ' Resize the height of the Command window.
   Frame.LinkedWindows.Item(3).Height = 800
   MsgBox("Now undocking the Command window from the frame.")

   ' Undock the Command window from the frame.
   Frame.LinkedWindows.Remove(w3)
End Sub

参照

関連項目

EnvDTE 名前空間