Catches and discards any MathematicaNotReadyException thrown during painting. Exceptions thrown during painting seem to be treated specially by .NET: Once one is thrown, the component paints itself with a red X and then never enters the OnPaint() method again. But MathematicaNotReadyExceptions are easy to generate in components that have a Paint event handler written in Mathematica. For example, the component is brought to the foreground and needs repainting but the kernel is busy with another computation. We don't want such exceptions to prevent the component from ever being drawn correctly again.