DXWIN0007: Invocation without Handle
In This Article
Severity: Warning
Calling a BeginInvoke
or Invoke
method for a control that has no handle associated with it causes an error. Always check the IsHandleCreated property to avoid this scenario.
#Invalid Code
C#
myControl.BeginInvoke(new Action(() => {
// TODO
}));
#Valid Code
C#
if (this.IsHandleCreated) {
this.BeginInvoke(new Action(() => {
// TODO
}));
}