I have one problem when winform opening long time if I sent another request is giving Error creating window handle for flowlayout panel control clearing:
flw.Invoke(new Action(() => flw.Controls.Clear()));
Error : ERROR OnExampleDTOReceived:Error creating window handle.-->-->System.ComponentModel.Win32Exception: Error creating window handle. at System.Windows.Forms.Control.MarshaledInvoke(Control caller, Delegate method, Object[] args, Boolean synchronous) at System.Windows.Forms.Control.Invoke(Delegate method, Object[] args) at PrxCustScr.Sockets.Listener.EndTrx(String data, FlowLayoutPanel flw) in \Source\Workspaces\TestApplications\PrxCustScr\PrxCustScr\Sockets\Listener.cs:line 689 at PrxCustScr.Sockets.Listener.OnExampleDTOReceived(String message) in \Source\Workspaces\TestApplications\PrxCustScr\PrxCustScr\Sockets\Listener.cs:line 273--> at System.Windows.Forms.Control.MarshaledInvoke(Control caller, Delegate method, Object[] args, Boolean synchronous) at System.Windows.Forms.Control.Invoke(Delegate method, Object[] args) at PrxCustScr.Sockets.Listener.EndTrx(String data, FlowLayoutPanel flw) in \Source\Workspaces\TestApplications\PrxCustScr\PrxCustScr\Sockets\Listener.cs:line 689 at PrxCustScr.Sockets.Listener.OnExampleDTOReceived(String message) in \Source\Workspaces\TestApplications\PrxCustScr\PrxCustScr\Sockets\Listener.cs:line 273
How can I solve this problem ?