Prev: 7-bit and News Servers
Next: Eternal September Rocks!
From: kpg on 3 Jun 2010 13:10 "Bob Butler" <noway(a)nospam.ever> wrote in news:nPQNn.36020$h57.20882(a)newsfe22.iad: > There is a limit of 255 control names; control arrays created at > design time will take the same amount of "space" in the source files > as ones not in control arrays but they only count as 1 towards the > limit. If you are really saying that the total number of controls is > reaching 32K then I'm surprised it ever finishes loading. I knew I had more than 255, in fact I have 642. After removing duplicates from the list due to control arrays I am at 255. So yes, 255 max, control arrays count as 1. I like the idea of drawing lines directly on the form. This will save at least 11 if my hungarian notation was used consistantly. Thanks for the info.
From: kpg on 3 Jun 2010 13:38 Karl E. Peterson <karl(a)exmvps.org> wrote in news:uPY#w5zALHA.5808(a)TK2MSFTNGP02.phx.gbl: > kpg wrote: >> Every control on the form is configured and moved at run time, so I'm >> safe to assume that if a control is not touched in code it is no >> longer used, hence my desire for a dead control sweep. > > OMG! I had no idea it could be *that* dire. I figured you meant > controls that were /truly/ unused. As in, not even placed on any > forms, just hanging out in the toolbox. > > I'd be looking at rebuilding the entire UI at this point, if I were > called in on this one. ....and I would love to have you. My next step with the software is vb.net...with as much of an OOP influence as I can muster while maintaining my sanity. But now that I know the limit is 255 I don't feel nearly as bad as when I thought I had 32k controls on the form (that would be nuts). On a side note, I ran into this problem when I attempted to add yet another control to my over-controlled form and was denied. The control I wanted to add was a 4th member of a 3 control array. So while this should not have counted against the 255 limit, it was denied. I deleted an unused line and now I can add the 4th array member, and in fact, a 5th and 6th... So while under the 255 limit the IDE allows as many new control array items as you desire, at the limit it denies new controls even though it would not technically cause the limit to be exceeded. Life at the edge, go figure.
From: Karl E. Peterson on 3 Jun 2010 14:24 kpg has brought this to us : > Karl E. Peterson <karl(a)exmvps.org> wrote: >> kpg wrote: >>> Every control on the form is configured and moved at run time, so I'm >>> safe to assume that if a control is not touched in code it is no >>> longer used, hence my desire for a dead control sweep. >> >> OMG! I had no idea it could be *that* dire. I figured you meant >> controls that were /truly/ unused. As in, not even placed on any >> forms, just hanging out in the toolbox. >> >> I'd be looking at rebuilding the entire UI at this point, if I were >> called in on this one. > > ...and I would love to have you. > > My next step with the software is vb.net...with as much of an OOP influence > as I can muster while maintaining my sanity. Ooooh, my condolences. > But now that I know the limit is 255 I don't feel nearly as bad as when I > thought I had 32k controls on the form (that would be nuts). <chuckle> > On a side note, I ran into this problem when I attempted to add yet another > control to my over-controlled form and was denied. The control I wanted to > add was a 4th member of a 3 control array. So while this should not have > counted against the 255 limit, it was denied. I deleted an unused line and > now I can add the 4th array member, and in fact, a 5th and 6th... Probably some little "off by one" error that very few (sane) folks would've stumbled across in the past. <gd&r> > So while under the 255 limit the IDE allows as many new control array items > as you desire, at the limit it denies new controls even though it would not > technically cause the limit to be exceeded. Life at the edge, go figure. Heh... -- ..NET: It's About Trust! http://vfred.mvps.org Customer Hatred Knows No Bounds at MSFT ClassicVB Users Regroup! comp.lang.basic.visual.misc Free usenet access at http://www.eternal-september.org
From: David Kaye on 3 Jun 2010 18:57 kpg <ipost(a)thereforeiam> wrote: >I have a legacy app (ah, the absolution that comes when I say 'legacy') >that has the maximum amount of controls, that is, the vb6 ide will not >allow me to add any more. That's so incredibly absurd. For one, if there are a lot of checkboxes or option buttons those can be replaced by listboxes and comboboxes. It also saves screen real estate. Also, many controls can be reused. For instance, I have a grid I use for about 15 different functions. Basically, any kind of list that doesn't require a selection goes onto the grid and the columns are adjusted accordingly. I don't think I've ever seen a program with 32767 controls on it. Oh, and it also seems that a program that large can probably be broken down into different programs and run as a suite. For instance on one program I have that does a lot of database intensive reading and writing, I set that off as a separate module independent of the main program. This simplifies interference problems, such as not having to deactivate parts of the program while a database scan is running, or make allowances for the hang time in some database record updates.
From: Dee Earley on 4 Jun 2010 12:41 On 03/06/2010 14:17, kpg wrote: > Karl E. Peterson<karl(a)exmvps.org> wrote in > news:uGzox9pALHA.980(a)TK2MSFTNGP04.phx.gbl: > >> Do you really have projects with so many controls, you're not sure if >> some of them are even used? > > I knew someone would ask this question, and the answer is...Yes. > > I have a legacy app (ah, the absolution that comes when I say 'legacy') > that has the maximum amount of controls, that is, the vb6 ide will not > allow me to add any more. I really don't know what that number is (32767?) > but I am there. This form is complex but functional. That's a ridiculous number of controls to have on a single window. Try splitting it up into usercontrosl that you can place ont he main form, especially if only groups are visibel at any one time. That and it'll be 32767 times easier to manage :p Note that you'll soon hit the windows limit of the number of handles for a process (10K iirc) if you carry on with this craziness :) -- Dee Earley (dee.earley(a)icode.co.uk) i-Catcher Development Team iCode Systems (Replies direct to my email address will be ignored. Please reply to the group.)
First
|
Prev
|
Next
|
Last
Pages: 1 2 3 4 Prev: 7-bit and News Servers Next: Eternal September Rocks! |