ArcFM Responder Mobile Developer Guide
ControlSafeInvoke Method






A multicast delegate (note: C# delegates are type System.MulticastDelegate).
The delegate arguments
Invokes an event or delegate while taking into consideration the fact that controls are not thread-safe.
Syntax
'Declaration
 
Public Shared Function ControlSafeInvoke( _
   ByVal multicast As System.MulticastDelegate, _
   ByVal ParamArray args() As System.Object _
) As System.Object
'Usage
 
Dim multicast As System.MulticastDelegate
Dim args() As System.Object
Dim value As System.Object
 
value = ArcMapUtilities.ControlSafeInvoke(multicast, args)
public static System.object ControlSafeInvoke( 
   System.MulticastDelegate multicast,
   params System.object[] args
)
public function ControlSafeInvoke( 
    multicast: System.MulticastDelegate;
   params  args: System.TObjectarray of
): System.TObject; static; 
public static function ControlSafeInvoke( 
   multicast : System.MulticastDelegate,
   args : System.Object[]
) : System.Object;
public: static System.Object* ControlSafeInvoke( 
   System.MulticastDelegate* multicast,
   params System.Object*[]* args
) 
public:
static System.Object^ ControlSafeInvoke( 
   System.MulticastDelegate^ multicast,
   ... System.array<Object^>^ args
) 

Parameters

multicast
A multicast delegate (note: C# delegates are type System.MulticastDelegate).
args
The delegate arguments
Remarks
The only thread that may safely call a method on a control is the thread that created the control. Any other thread must marshal the call to the control's creating thread. This is done by calling the controls Invoke method. If the delegate is invoked from the control's thread then the delegate can be called directly; this is determined by checking the control's InvokeRequired property. %%
Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

ArcMapUtilities Class
ArcMapUtilities Members

Send Feedback