You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
"Error creating window handle." From PictureBox.OnFrameChanged #14823
at System.Windows.Forms.NativeWindow.CreateHandle(CreateParams cp)
at System.Windows.Forms.Control.CreateHandle()
at System.Windows.Forms.Control.get_Handle()
at System.Windows.Forms.Control.IHandle<Windows.Win32.Foundation.HWND>.get_Handle()
at System.Windows.Forms.Control.get_InvokeRequired()
at System.Windows.Forms.PictureBox.OnFrameChanged(Object o, EventArgs e)
at System.Drawing.ImageAnimator.ImageInfo.AdvanceAnimationBy(Int64 milliseconds)
at System.Drawing.ImageAnimator.AnimateImages()
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
I've checked the code and the code in the PictureBox has InvokeRequired && IsHandleCreated
While in other controls e.g. Label, ButtonBase, the code is IsHandleCreated && InvokeRequired
Do you think if the property check order is the root cause of the issue?
Activity
Zheng-Li01 commentedon Aug 20, 2026
No steps to verify, just checked the code have been changed in main branch of dotnet/winforms repro as below screenshot.
Zheng-Li01 commentedon Aug 27, 2026
Checked the code have been changed in release/11.00rc1 branch of dotnet/winforms repro, it has the same validation result as above.