この記事は翻訳者によって翻訳されたものです。 記事の文章にポインターを重ねると、原文のテキストが表示されます。 |
訳文
原文
|
Window インターフェイス
Window オブジェクトは、環境内にあるウィンドウを表します。
アセンブリ: EnvDTE (EnvDTE.dll 内)
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