コレクションに含まれている TaskPaneObject オブジェクトの数を取得します。
名前空間: Microsoft.Office.Interop.InfoPath
アセンブリ: Microsoft.Office.Interop.InfoPath (microsoft.office.interop.infopath.dll 内)
構文
'宣言
<DispIdAttribute(1)> _
ReadOnly Property Count As Integer
'使用
Dim instance As TaskPanes
Dim value As Integer
value = instance.Count
[DispIdAttribute(1)]
int Count { get; }
コメント
次の例では、for ループ内で Count プロパティを使用して、TaskPane オブジェクトのコレクション全体を反復処理します。各 TaskPane オブジェクトの Visible プロパティを確認して、true の場合は false に設定します。
TaskPanes taskPanes;
taskPanes = thisXDocument.View.Window.TaskPanes;
for (int i=0; i < taskPanes.Count; i++)
{
if (taskPanes[i].Visible == true)
{
taskPanes[i].Visible = false;
}
}
関連項目
参照
TaskPanes インターフェイス
TaskPanes のメンバ
Microsoft.Office.Interop.InfoPath 名前空間