Home All Groups Group Topic Archive Search About

Maximum number of controls in a form

Author
17 May 2006 6:24 PM
M
There are a maximum number of controls can be put in a form for  VB3 to VB6.
The BOL of VBNET do not say VBNET also has this limitation.

Because the clients want add more functions from time to time.
I find one of the form reach the maximum number of controls.
If I add one more control in this form, the program will get error at
InitializeComponent.

Are anyone find similar situation

Thanks

Author
17 May 2006 6:46 PM
vbnetdev
you are only limited by the amount of available memory or 32K child
controls, whichever is less.

--
Get a powerful web, database, application, and email hosting with KJM
Solutions
http://www.kjmsolutions.com



Show quoteHide quote
"M" <mxc***@hotvoice.com> wrote in message
news:uqYbj8deGHA.3888@TK2MSFTNGP02.phx.gbl...
>
> There are a maximum number of controls can be put in a form for  VB3 to
> VB6.
> The BOL of VBNET do not say VBNET also has this limitation.
>
> Because the clients want add more functions from time to time.
> I find one of the form reach the maximum number of controls.
> If I add one more control in this form, the program will get error at
> InitializeComponent.
>
> Are anyone find similar situation
>
> Thanks
>
>
>
>
Author
18 May 2006 2:50 PM
M
Thanks.
But where do you find the 32K.
There are thousands controls in the form but I believed no reach 32K

Show quoteHide quote
"vbnetdev" <vbnetdev@community.nospam> wrote in message
news:%23QHpuIeeGHA.1792@TK2MSFTNGP03.phx.gbl...
>
> you are only limited by the amount of available memory or 32K child
> controls, whichever is less.
>
> --
> Get a powerful web, database, application, and email hosting with KJM
> Solutions
> http://www.kjmsolutions.com
>
>
>
> "M" <mxc***@hotvoice.com> wrote in message
> news:uqYbj8deGHA.3888@TK2MSFTNGP02.phx.gbl...
> >
> > There are a maximum number of controls can be put in a form for  VB3 to
> > VB6.
> > The BOL of VBNET do not say VBNET also has this limitation.
> >
> > Because the clients want add more functions from time to time.
> > I find one of the form reach the maximum number of controls.
> > If I add one more control in this form, the program will get error at
> > InitializeComponent.
> >
> > Are anyone find similar situation
> >
> > Thanks
> >
> >
> >
> >
>
>
>
Author
18 May 2006 9:54 PM
Herfried K. Wagner [MVP]
"M" <mxc***@hotvoice.com> schrieb:
> But where do you find the 32K.
> There are thousands controls in the form but I believed no reach 32K

Really bad.  I am wondering which controls you are using on the form.  Maybe
some static controls such as labels and pictureboxes can be replaced by
drawing the text onto the form directly in its overridden 'OnPaint' method.

--
M S   Herfried K. Wagner
M V P  <URL:http://dotnet.mvps.org/>
V B   <URL:http://classicvb.org/petition/>
Author
17 May 2006 7:37 PM
Herfried K. Wagner [MVP]
"M" <mxc***@hotvoice.com> schrieb:
> There are a maximum number of controls can be put in a form for  VB3 to
> VB6.
> The BOL of VBNET do not say VBNET also has this limitation.

Basically there is no such strict limit as in VB6.  However, the number of
controls on a form is limited by memory and other factors.

> Because the clients want add more functions from time to time.
> I find one of the form reach the maximum number of controls.
> If I add one more control in this form, the program will get error at
> InitializeComponent.

What's the exact error message?  Maybe it's time to refactor the user
interface and split up the huge form.

--
M S   Herfried K. Wagner
M V P  <URL:http://dotnet.mvps.org/>
V B   <URL:http://classicvb.org/petition/>
Author
18 May 2006 4:59 AM
Cor Ligthert [MVP]
M,

We did some years ago a test in this newsgroup about how many controls where
possible.

The used number was so high that it would never be possible to put those in
a reasonable way on a form.

I hope this helps,

Cor

Show quoteHide quote
"M" <mxc***@hotvoice.com> schreef in bericht
news:uqYbj8deGHA.3888@TK2MSFTNGP02.phx.gbl...
>
> There are a maximum number of controls can be put in a form for  VB3 to
> VB6.
> The BOL of VBNET do not say VBNET also has this limitation.
>
> Because the clients want add more functions from time to time.
> I find one of the form reach the maximum number of controls.
> If I add one more control in this form, the program will get error at
> InitializeComponent.
>
> Are anyone find similar situation
>
> Thanks
>
>
>
>