I use VB5 and I have a form which has very close to VB 5's limit of 255 controls per form which is starting to concern me. Can someone tell me if the limit for VB6 was increased and let's not forget VB net if possible (although changing the code to suit VB net sounds like a nightmare).

Thanks.

The limit is also stillin place on VB6, I have no idea about .net, but I knew for certain that vb6 has that control limit in place (I just clicked about 255 times, on the toolbar to add a button). At button caption 254, I was told it couldn't add any more.

Thanks. I'm surprised it was not increased. It seems a lot when you start, but I want the user to be able to do as many things as possible whilst in the one form. There are many ways to tackle the problem all of which make everything more difficult! Oh well......

One thing I have NOT tried, and I will when I get home from work is to see if you put them in a frame (container) or a tabbed dialog control if it will hold more, since the tabbed dialog control or the frame should be considered the parent.... it might allow for more than 254 per form, but limited to 254 frames or tabs, know what I mean?

One thing I have NOT tried, and I will when I get home from work is to see if you put them in a frame (container) or a tabbed dialog control if it will hold more, since the tabbed dialog control or the frame should be considered the parent.... it might allow for more than 254 per form, but limited to 254 frames or tabs, know what I mean?

I just tried your idea. I created 253 Label controls. Then I created a frame taking the total to 254. I tried to add a label in the frame. No go. Worth checking out though. I don't know what a tabbed dialog control is! Maybe is is not with my version of VB (VB 5 learning edition).

I know you can redefine some of the controls as a control arrays. I have just been checking this out and it seems easier than I had thought.

Thanks.

Control arrays are a breeze. The tabbed control I think is sp3 of VB6... I could be mistaken, but I think so. Control arrays are nothing more than controls of the same name with a different index. It really makes processing textboxes a lot easier too, so you can do something like:

for I = 0 to textboxname.count -1
     textboxname(I).text = vbnullstring
next I

I'll try it with the tabbed control when I get home (if I remember), but it seems the frame won't work :(

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.