Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

default form control amounts

Posted on 1998-12-18
3
Medium Priority
?
133 Views
Last Modified: 2010-05-03
Is there a way to change the limit of controls (labels, combo boxes, grid etc) on a form? Right now if you have 256 controls on a from you can not have any more. Is there a way to change that number?
0
Comment
Question by:MaryD
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 10

Accepted Solution

by:
caraf_g earned 200 total points
ID: 1451297
You can get around this problem programmatically.

For each control type that you intend to use, just place one control of that type on your form, and give it an index of 0 (see properties). That will cause it to be part of a control array.

You can then create as many instances of the control as you like by loading each new instance:

Load Command1(1)
Load Command1(2)
Load Command1(3)
etc..

This is a real pain in the proverbial, you'll have to make each newly loaded control visible, position it and so on and so forth.
Also, all your control events, e.g. Command1_Click will now have an Index, and you will have to keep track of what each index number stands for. You will have to set captions, texts.... and so on.

But at least this will get you around the problem and it will allow you to have an "unlimited" amount of controls on your form.

(VB5, and I guess any VB version 4 and higher)
0
 
LVL 1

Expert Comment

by:OeilNoir
ID: 1451298
to tell you the truth, i don't know, but i would be very surprised there is a way. the limit is probably not imposed without reasons.. must be a VB momery limite or something...
like trying to enter a number higher than 256 in a Byte variable...

may i ask a question? why would you need more than 256 Controls on a form? try to create them at run time, that why the one you don't use won't be loaded...
0
 

Author Comment

by:MaryD
ID: 1451299
Thanks, actually I didn't even think about making arrays.
Yes that will be a real pain in the proverbial!!

Happy Holidays
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Suggested Courses

609 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question