Skip to main content
All docs
V25.1
  • DXWIN0007: Invocation without Handle

    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

    myControl.BeginInvoke(new Action(() => {
        // TODO
    }));
    

    Valid Code

    if (this.IsHandleCreated) {
        this.BeginInvoke(new Action(() => {
            // TODO
        }));
    }