UtilFormsControlInvokeT Method
Synchronouslly Executes an encapsulated method on the thread that owns the specified control.
This method avoids cross-threading exceptions.
Namespace: DevCase.Core.Application.FormsAssembly: DevCase.net48 (in DevCase.net48.dll) Version: 6.0.0.0 (6.0)
XMLNS for XAML: Not mapped to an xmlns.
public static void ControlInvoke<T>(
T ctrl,
Action<T> method
)
where T : Control
Public Shared Sub ControlInvoke(Of T As Control) (
ctrl As T,
method As Action(Of T)
)
Dim ctrl As T
Dim method As Action(Of T)
UtilForms.ControlInvoke(ctrl, method)
public:
generic<typename T>
where T : Control
static void ControlInvoke(
T ctrl,
Action<T>^ method
)
static member ControlInvoke :
ctrl : 'T *
method : Action<'T> -> unit when 'T : Control
No code example is currently available or this language may not be supported.
- ctrl T
-
The Control to invoke.
- method ActionT
-
The encapsulated method to be called.
- T
-
The type of the control
This is a code example.
No code example is currently available or this language may not be supported.
ControlInvoke(TextBox1, Sub(tb) tb.Text = "Hello World!")
ControlInvoke(TextBox1, Sub(tb As TextBox)
For x As Integer = 0 To 50
tb.AppendText(CStr(x))
Next x
End Sub)
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.