Click here to Skip to main content
15,917,645 members
Please Sign up or sign in to vote.
2.33/5 (4 votes)
See more:
hi Experts
I'm getting a "Error Creating Window Handle" because I have too many controls being loaded over a period time. Basically I have 1 TableLayoutPanel and each Table loads approx 10 custom controls (each TableLayoutPanel has 3 lables, 2 Picturebox and 3 Text Box control) and Click anywhere in the Usercontrol will be added By moving the Mouse will re-draw because their status is changed
You can help to solve the problem
Posted
Updated 23-Sep-16 9:07am
v3
Comments
OriginalGriff 6-Mar-11 3:14am    
"You can help to solve the problem" - not unless you explain in a little more detail - I can't understand what your problem is. Please edit your question and try to provide better detail.

1 solution

No, this is hardly because you have too many controls: your list does not look like too big at all. To find out exact solution you will need to catch this exception and provide its full dump; it should include exception stack (first of all) and all inner exceptions, recursively. If you want to post this information, use "Improve Answer". (Please don't post anything as Answer!)

Nevertheless, if you really face the problem of too many controls, remember: you should not populate all your control at the same time. Right design should show not much more controls then the user want to see at the same time on the screen (and user does not want to see many). If your total number of control much more than that, remember not to show invisible controls: create and adds the on demand, as the user selects panels, pages, tab pages, etc. where those controls are supposed to be hosted.

—SA
 
Share this answer
 
Comments
Sandeep Mewara 6-Mar-11 4:09am    
Well, inspite you asked, OP did posted comment as an answer.

Comment from OP:
I am using the UserControl as ToolTip and I can not remove I'm working with maps and may click anywhere in the map(GmapControl) will be up to a ToolTip show, but when I add third-UserControl as ToolTip on comes to the issue
Sergey Alexandrovich Kryukov 6-Mar-11 4:44am    
Would you create a separate question? Make it 10 times more clear (you say nothing clear right now).
Are you formally accepting this Answer? Your follow-up answer does not look related?
--SA
Mithun146 20-Jun-14 10:20am    
i too have the same issue. But in my windows form has only few buttons and a Crystal report Viewer is placed on it. When i invoke the Show method, Form doesn't displayed. While debugging step by step i found this Exception on Forms object.

Can anyone help me to fix this.


Thanks In advance.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900