Solved

default form control amounts

Posted on 1998-12-18
3
124 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
3 Comments
 
LVL 10

Accepted Solution

by:
caraf_g earned 50 total points
Comment Utility
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
Comment Utility
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
Comment Utility
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

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

762 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

Need Help in Real-Time?

Connect with top rated Experts

8 Experts available now in Live!

Get 1:1 Help Now