Can anyone tell me the limit of number of controls that can be used on the form

None that I have ever heard of. I have seen plus 300 on some applications.

actually there is a limit in VB6.0 i.e we can not use more than 255 controls in a form......that is why i was wondering that .....Is there any limit to it in VB.NET

Hmm, interesting, I am sure I saw more than that, ah well. As for Visual Basic.Net, I still have never heard of a limit.

I took this from MSDN April2001 edition

However, there is a fixed limit of 254 control names per form. A control array counts only once toward this limit because all the controls in the array share a single control name.

The limit on control array indexes is 0 to 32,767 on all versions.

If you layer controls on top of each other, such as using several frame controls within other frames, Visual Basic will generally accept no more than 25 levels of nested controls.


But i guess there must be some limit in VB.NET or it just depends on system resources

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.