TaskPaneObject インターフェイス

定義

ウィンドウに関連付けられている Microsoft InfoPath フォームの作業ウィンドウを表します。

public interface class TaskPaneObject : Microsoft::Office::Interop::InfoPath::SemiTrust::TaskPane
[System.Runtime.InteropServices.Guid("096cd58e-0786-11d1-95fa-0080c78ee3bb")]
public interface TaskPaneObject : Microsoft.Office.Interop.InfoPath.SemiTrust.TaskPane
type TaskPaneObject = interface
    interface TaskPane
Public Interface TaskPaneObject
Implements TaskPane
属性
実装

次の例では、コレクションの プロパティをItem[Object]TaskPanesCollection使用して、カスタム作業ウィンドウを表す TaskPane オブジェクトへの参照を取得します。 次に、TaskPane オブジェクトによって継承される オブジェクトの プロパティを使用してHTMLDocument、カスタム作業ウィンドウの HTMLTaskPaneObject HTML コードで定義されたスクリプト関数を呼び出します。

// Ensure View has loaded before trying to access the task pane.
if (thisXDocument.View != null)
{
 // Get a reference to the custom task pane.  It is always the 0-th
 // task pane in the TaskPanes collection.
 HTMLTaskPane custom = (HTMLTaskPane) thisXDocument.View.Window.TaskPanes[0];

 // Ensure that the task pane is completely loaded.
 if (custom != null && custom.HTMLDocument.readyState == "complete")
 {
  mshtml.IHTMLWindow2 window = custom.HTMLDocument.parentWindow;

  object[] args =  new object[] {"ViewID"};

  // call into script through CLR late binding mechanism
  window.GetType().InvokeMember(
   "SelectView",      // late bound method      
   System.Reflection.BindingFlags.InvokeMethod |   // binding flags
   System.Reflection.BindingFlags.DeclaredOnly | 
   System.Reflection.BindingFlags.Public | 
   System.Reflection.BindingFlags.Instance,     
   null,        // binder object
   window,        // target object
   args);
 }
}

: 上記の例では、Microsoft.mshtml.dll アセンブリへの参照が必要です。

注釈

この型は、COM の相互運用性を得るためにマネージ コードが必要とするコクラスのラッパーです。 この型を使用して、このコクラスによって実装される COM インターフェイスにアクセスします。 COM インターフェイスの詳細については、そのメンバーの説明へのリンクを参照してくださいTaskPane

TaskPaneObject オブジェクトには、InfoPath の組み込み作業ウィンドウを操作するためのプロパティが用意されています。 オブジェクトは HTMLTaskPaneObject 、カスタム作業ウィンドウを操作するためにこれらのプロパティを継承します。

InfoPath の作業ウィンドウで使用できるプロパティは、操作する作業ウィンドウの種類によって決まります。 プロパティが TaskPaneType 0 を返す場合、作業ウィンドウはカスタム作業ウィンドウであり、使用可能なプロパティとメソッドは HTMLTaskPane オブジェクトによって提供されます。 TaskPaneType プロパティがその他の値を返す場合、作業ウィンドウは組み込み作業ウィンドウであり、プロパティは TaskPaneObject オブジェクトによって提供されます。

: TaskPaneType は列挙に XdTaskPaneType 基づいています。 これらの列挙値は、指定した種類の作業ウィンドウへの参照をTaskPanesCollection返すために、コレクションのプロパティItem[Object]の引数としても使用されます。

プロパティ

TaskPaneType

オブジェクトによって表される作業ウィンドウの種類を示す値を TaskPaneObject 取得します。

(継承元 TaskPane)
Visible

オブジェクトによって TaskPaneObject 表される作業ウィンドウが Microsoft InfoPath ユーザー インターフェイスに表示されることを示す値を取得または設定します。

(継承元 TaskPane)

適用対象