Control Limit 
Author Message
 Control Limit

VB6SP6
Ran into a barrier and big trouble.
Adding menu items and was scolded that I had too many.
So I deleted and deleted and still got the error mssage.
Then I closed the Menu Editor to find that ALL of my previoulsy OK menu
items were all erased!!!  Gone, totally - all traces that I ever had a menu
items.
Bad form M$ !!!

1) where in the IDE does it tell you how many controls are in use???  Room
for how many more ???
2) what constitutes a control?  All menu entry levels (each one counted) or
only the top level entries?
3) If I index the menu sub entries will that count as only one control?
Do not want to waste too much time on this as an investigton.
Hopefully someone knows the secrets.

I am sure M$ will immediately fix this and issue a release and include the
correction in the forthcoming new VB (not .net).   lol

Yes, I have been rewriting and using indexed controls to reduce this poor
limit.
But not sure how this all plays with menu items ... and ... whatelse ???



Fri, 17 Dec 2010 09:06:00 GMT  
 Control Limit

|
| 1) where in the IDE does it tell you how many controls are in use???  Room
| for how many more ???

Install the (free) MZ-Tools 3 add-in, from http://www.mztools.com/.

It has a statistics function which will tell you how many controls you're
using on each form, and in total.

Also see references in
http://kbalertz.com/229756/Maximum-Number-Controls.aspx for information
about VB's limits.



Fri, 17 Dec 2010 10:12:06 GMT  
 Control Limit


Quote:
> VB6SP6
> Ran into a barrier and big trouble.
> Adding menu items and was scolded that I had too many.
> So I deleted and deleted and still got the error mssage.
> Then I closed the Menu Editor to find that ALL of my previoulsy OK menu
> items were all erased!!!  Gone, totally - all traces that I ever had a
menu
> items.
> Bad form M$ !!!

> 1) where in the IDE does it tell you how many controls are in use???  Room
> for how many more ???
> 2) what constitutes a control?  All menu entry levels (each one counted)
or
> only the top level entries?
> 3) If I index the menu sub entries will that count as only one control?
> Do not want to waste too much time on this as an investigton.
> Hopefully someone knows the secrets.

> I am sure M$ will immediately fix this and issue a release and include the
> correction in the forthcoming new VB (not .net).   lol

> Yes, I have been rewriting and using indexed controls to reduce this poor
> limit.
> But not sure how this all plays with menu items ... and ... whatelse ???

To add to the pile:

There are subtle differences between VB's "menu" and real "menus". You can
build menus separately in code. Even to having different 'sets' that you can
pop in and out. That may help. (as in build as needed ???) Someone will be
along with more information, or a little googling should find alternative
menu controls/code. I unfortunately use a 3rd party menu control so my
advice on VB control would be useless (or even dangerous <g>).

Second, the menu information is kept in the Form as plain text. You can
actually build and modify the menus by editing the Form in a text editor.
This won't help on the number allowed, but it is a way to preserve menu
information and paste it back if necessary. It might also have been possible
to correct whatever problem there was in the first place. Whenever any of
the VB editors appear to be screwing up or just "acting funny" it is useful
to stop and examine the module in a text editor and see if anything strange
is going on.

(VSS is always a good option).

hth
-ralph



Fri, 17 Dec 2010 12:11:37 GMT  
 Control Limit

released on Sun, 29 Jun 2008 18:06:00 -0700 bearing the
following fruit:

Quote:
>VB6SP6
>Ran into a barrier and big trouble.
>Adding menu items and was scolded that I had too many.
>So I deleted and deleted and still got the error mssage.
>Then I closed the Menu Editor to find that ALL of my previoulsy OK menu
>items were all erased!!!  Gone, totally - all traces that I ever had a menu
>items.
>Bad form M$ !!!

>1) where in the IDE does it tell you how many controls are in use???  Room
>for how many more ???
>2) what constitutes a control?  All menu entry levels (each one counted) or
>only the top level entries?
>3) If I index the menu sub entries will that count as only one control?
>Do not want to waste too much time on this as an investigton.
>Hopefully someone knows the secrets.

You are limited in the number of control names you can have,
so yes creating control indexes gets round the issue.

Quote:
>I am sure M$ will immediately fix this and issue a release and include the
>correction in the forthcoming new VB (not .net).   lol

It's all documented, it's not a bug. It's a feature.

J

Quote:
>Yes, I have been rewriting and using indexed controls to reduce this poor
>limit.
>But not sure how this all plays with menu items ... and ... whatelse ???

--
Jan Hyde

https://mvp.support.microsoft.com/profile/Jan.Hyde



Fri, 17 Dec 2010 16:28:26 GMT  
 Control Limit
googling got me some dead links.
Anyone have some sample code that creates menus?
Quote:



> > VB6SP6
> > Ran into a barrier and big trouble.
> > Adding menu items and was scolded that I had too many.
> > So I deleted and deleted and still got the error mssage.
> > Then I closed the Menu Editor to find that ALL of my previoulsy OK menu
> > items were all erased!!!  Gone, totally - all traces that I ever had a
> menu
> > items.
> > Bad form M$ !!!

> > 1) where in the IDE does it tell you how many controls are in use???  Room
> > for how many more ???
> > 2) what constitutes a control?  All menu entry levels (each one counted)
> or
> > only the top level entries?
> > 3) If I index the menu sub entries will that count as only one control?
> > Do not want to waste too much time on this as an investigton.
> > Hopefully someone knows the secrets.

> > I am sure M$ will immediately fix this and issue a release and include the
> > correction in the forthcoming new VB (not .net).   lol

> > Yes, I have been rewriting and using indexed controls to reduce this poor
> > limit.
> > But not sure how this all plays with menu items ... and ... whatelse ???

> To add to the pile:

> There are subtle differences between VB's "menu" and real "menus". You can
> build menus separately in code. Even to having different 'sets' that you can
> pop in and out. That may help. (as in build as needed ???) Someone will be
> along with more information, or a little googling should find alternative
> menu controls/code. I unfortunately use a 3rd party menu control so my
> advice on VB control would be useless (or even dangerous <g>).

> Second, the menu information is kept in the Form as plain text. You can
> actually build and modify the menus by editing the Form in a text editor.
> This won't help on the number allowed, but it is a way to preserve menu
> information and paste it back if necessary. It might also have been possible
> to correct whatever problem there was in the first place. Whenever any of
> the VB editors appear to be screwing up or just "acting funny" it is useful
> to stop and examine the module in a text editor and see if anything strange
> is going on.

> (VSS is always a good option).

> hth
> -ralph



Sat, 18 Dec 2010 01:49:00 GMT  
 Control Limit


Quote:
> googling got me some dead links.
> Anyone have some sample code that creates menus?

I'm sure there are examples to load controls in VB Help,
but for a little more style, you might have a look around
these pages:

http://www.vbaccelerator.com/home/VB/Code/Controls/Menus/index.asp

LFS



Sat, 18 Dec 2010 01:59:57 GMT  
 Control Limit
Looks good.
Thanks!
Quote:


> > googling got me some dead links.
> > Anyone have some sample code that creates menus?

> I'm sure there are examples to load controls in VB Help,
> but for a little more style, you might have a look around
> these pages:

> http://www.vbaccelerator.com/home/VB/Code/Controls/Menus/index.asp

> LFS



Sat, 18 Dec 2010 03:57:02 GMT  
 
 [ 7 post ] 

 Relevant Pages 

1. Control limit on insertion.

2. ListView control limits

3. Timer Control Limits

4. UGH, form control limit

5. HTML Layout Control Limited?

6. Bound control limit, - does it exist?

7. Extend the 255 control limit

8. Size of Controls limited by Form Size ?

9. Size of Controls limited by Form Size ?

10. 255 control limit on forms

11. grid control limits

12. 254-control limit on form

 

 
Powered by phpBB® Forum Software