private void OnAnimateImage (object sender, EventArgs e)
{
// This is called from a worker thread,BeginInvoke is used
// so the control is updated from the correct thread
// Check if we have a handle again, since it may have gotten
// destroyed since the last time we checked.
if (!IsHandleCreated)
return;
BeginInvoke (new EventHandler (UpdateAnimatedImage), new object [] { this, e });
}