An error occur when the window is resized. You may get an error similar to the below. Windows has a limit of 1000 windows handles, so if there is a memory leak in the app then you may get this error.

System.ComponentModel.Win32Exception: Error creating window handle.
   at System.Windows.Forms.NativeWindow.CreateHandle(CreateParams cp)
   at System.Windows.Forms.Control.CreateHandle()
   at System.Windows.Forms.TextBoxBase.CreateHandle()
   at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
   at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
   at System.Windows.Forms.Control.CreateControl()
   at System.Windows.Forms.Control.SetVisibleCore(Boolean value)
   at System.Windows.Forms.TabPage.set_Visible(Boolean value)
   at System.Windows.Forms.TabControl.UpdateTabSelection(Boolean updateFocus)
   at System.Windows.Forms.TabControl.OnSelectedIndexChanged(EventArgs e)
   at System.Windows.Forms.TabControl.WmSelChange()
   at System.Windows.Forms.TabControl.set_SelectedIndex(Int32 value)
   at C

  
Try to use Process Explorer or the Windows Task Manager to look at the GDI Objects, Handles, Threads and USER objects. To view the additional columns in Task Manager try this:

1. Go to Task Manager
2. Select View -> Select the columns you want to view.

Check to see if you can detect any object that grows very large. It might be that you've got UI components that you think are cleaned up but haven't been Disposed.

Also use Memory Profiler to check for memory leak that could cause this error.

 
SEO Building Block