Add this conditional statement:
If DirectCast(m_SynchronizingObject, System.Windows.Forms.Control).IsHandleCreated Then
m_SynchronizingObject.BeginInvoke(errorsd, Parameters)
End If
Doing few times testing with above code, result: no more error, thanks a lot.
But still if I click the BasicButton multiple times, the application becomes slow.
It seems like the click event is "queuing", as I can see the BasicButton animation when it is pressed.
For example, I click 4 times, then the application becomes slow for about 4-6 seconds,
after the BasicButton changing state 4 times, then the application runs back to normal.
More click will take longer period of the slow performance.
Please help to advise, thank you.
Best regards,
Andrew