944,028 Members | Top Members by Rank

Ad:
May 13th, 2005
0

Max number of controls per form......

Expand Post »
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.
Similar Threads
Reputation Points: 10
Solved Threads: 0
Light Poster
MrConfused is offline Offline
32 posts
since Mar 2005
May 14th, 2005
0

Re: Max number of controls per form......

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.
Team Colleague
Reputation Points: 361
Solved Threads: 214
Taboo Programmer
Comatose is offline Offline
2,413 posts
since Dec 2004
May 17th, 2005
0

Re: Max number of controls per form......

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......
Reputation Points: 10
Solved Threads: 0
Light Poster
MrConfused is offline Offline
32 posts
since Mar 2005
May 17th, 2005
0

Re: Max number of controls per form......

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?
Team Colleague
Reputation Points: 361
Solved Threads: 214
Taboo Programmer
Comatose is offline Offline
2,413 posts
since Dec 2004
May 17th, 2005
0

Re: Max number of controls per form......

Quote originally posted by Comatose ...
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.
Reputation Points: 10
Solved Threads: 0
Light Poster
MrConfused is offline Offline
32 posts
since Mar 2005
May 17th, 2005
0

Re: Max number of controls per form......

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:

Visual Basic 4 / 5 / 6 Syntax (Toggle Plain Text)
  1. for I = 0 to textboxname.count -1
  2. textboxname(I).text = vbnullstring
  3. 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
Team Colleague
Reputation Points: 361
Solved Threads: 214
Taboo Programmer
Comatose is offline Offline
2,413 posts
since Dec 2004

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Visual Basic 4 / 5 / 6 Forum Timeline: Timing frames on a form
Next Thread in Visual Basic 4 / 5 / 6 Forum Timeline: How to extract user network login name with vbscript?





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC