Jignesh.Raj
Jignesh.Raj

Reputation: 5987

How to add more than 254 Controls in vb6?

I'm working with VB6 and I have one form with multiple tab controls.

When I drag and drop any control in form it shows me this error:

enter image description here

Upvotes: 1

Views: 631

Answers (1)

Boann
Boann

Reputation: 50041

VB6 has a limited number of named controls per form. To add more controls, you can use a control array. That means, give some related controls the same name, then you can access them by name and index number. So instead of OptionAlways, OptionMaybe, and OptionNever, you could have Option(0), Option(1), and Option(2).

Also, if your dialog is very complex and most of its features are rarely needed, consider moving some options to additional dialogs behind an [Advanced...] button.

Upvotes: 6

Related Questions