System.Windows.Forms.Control.Invoke C# (CSharp) Method

Invoke() public method

public Invoke ( Delegate method ) : object
method System.Delegate
return object
		public object Invoke (Delegate method, params object[] args)
		{
			Control control = FindControlToInvokeOn ();
			
			if (!this.InvokeRequired)
			{
				return method.DynamicInvoke (args);
			}
			//TODO: fixme
						/*
			IAsyncResult result = BeginInvokeInternal (method, args, control);
			return EndInvoke(result);
			*/
return null;
		}

Usage Example

Example #1
1
 public static void BeginInvokeInControlThread(Control c, MethodInvoker code)
 {
     //c.BeginInvoke(code);
     if (c.InvokeRequired)
         c.BeginInvoke(code);
     else
         c.Invoke(code);
 }
All Usage Examples Of System.Windows.Forms.Control::Invoke
Control