Windows Develop Bookmark and Share   
 index > Windows Forms General > Maximum number of controls on a form
 

Maximum number of controls on a form

Is there a maximum as to the number of controls that can be on a form? I have a tab control on a form with seven tabs and at least 50 textboxes on each tab and the IDE seems to have trouble handling it.

Thanks,
cj
polymorphicx  Sunday, October 15, 2006 2:48 PM

Well, although it is discussed before, I'd like to make some summary since the thread looks out of order.

http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=770632&SiteID=1

I think there IS a limit on the maximum number of the controls because the system has the a limit number for GDI handlers. This value is stored in registry

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\Current Version\Windows\GDIProcessHandleQuota

DONT changethis registry valuegreater than16,000 since it may be failed if you want to change a value greater than that max value.

gqlu  Monday, October 16, 2006 2:08 AM

well yes, after adding such a number of controls you will find problems....but the SP1 should hopefully fix this problem (currently in beta). Remember, the more you add, the more work needs to be done, performance will degrade.

AFAIK there is no limitation but rather on the resources (memory for example). I've heard people say they can add 25000 controls but of course struggles to load. Some are less but I think its mainly on the resources available

ahmedilyas  Sunday, October 15, 2006 11:10 PM

Well, although it is discussed before, I'd like to make some summary since the thread looks out of order.

http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=770632&SiteID=1

I think there IS a limit on the maximum number of the controls because the system has the a limit number for GDI handlers. This value is stored in registry

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\Current Version\Windows\GDIProcessHandleQuota

DONT changethis registry valuegreater than16,000 since it may be failed if you want to change a value greater than that max value.

gqlu  Monday, October 16, 2006 2:08 AM
Thank you, this is helpful.
polymorphicx  Monday, October 16, 2006 3:20 AM

You can use google to search for other answers

Custom Search

More Threads

• PropertyGrid: RectangleF expandable object not working
• saveFileDialog fails handling big file names
• Debugging Windows Forms
• ToolStripDropDown cannot Auto-Scroll while mouse hover on the scrollable arrows
• EnumChildWindows() does not seem to work for some applications
• how can I change mouseHoverTime property?
• Resizable windows form (Using toolstrip Container). How?
• using HTMLElement.getAttribute for selecting <OPTION> in <SELECT> tag
• Use Microsoft Office Outlook in Application
• how to convert GB to bytes and MB to bytes