From: kpg on
Is there a utility out there that can scan my project files and tell if a
control is being used (referenced in code)?

I use MZTools to find dead code, but I want to find dead controls. Maybe
MZTools can do it, I just don't know how.

It wouldn't be too difficult to write something rough to do it myself, but
something readymade would be nice.

kpg
From: Karl E. Peterson on
kpg wrote:
> Is there a utility out there that can scan my project files and tell if a
> control is being used (referenced in code)?
>
> I use MZTools to find dead code, but I want to find dead controls. Maybe
> MZTools can do it, I just don't know how.
>
> It wouldn't be too difficult to write something rough to do it myself, but
> something readymade would be nice.

Well, VB does that automatically everytime it compiles. Unless you
tell it not to. (Project-Properties-Make)

Do you really have projects with so many controls, you're not sure if
some of them are even used?

--
..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: Larry Serflaten on

"kpg" <ipost(a)thereforeiam> wrote
> Is there a utility out there that can scan my project files and tell if a
> control is being used (referenced in code)?

See if this helps. Open the components dialog (Ctrl+T)
Hold down the Shift key and press OK.

LFS


From: kpg on
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. I believe that menu
items count against the total, as do shapes (lines) used to create divides
and borders, popup grids (frames and pictureboxes with multiple child
controls) that exist multiple times so they can be pre-loaded when the app
starts (when the app was first written machines were slow and navigation
speed was more important than startup time or memory usage). Good design?
heck no, In need of a re-write?, you bet, but that's not going to happen so
I've got what I've got.

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.

I've got a utility I wrote long ago to find undeclared variables in
QuickBasic code that does a fair job of building a symbol table from BASIC
code, I could probably adapt that to do this task.

From: kpg on
"Larry Serflaten" <serflaten(a)gmail.com> wrote in
news:hu6qrh$slk$1(a)news.eternal-september.org:

>
> "kpg" <ipost(a)thereforeiam> wrote
>> Is there a utility out there that can scan my project files and tell
>> if a control is being used (referenced in code)?
>
> See if this helps. Open the components dialog (Ctrl+T)
> Hold down the Shift key and press OK.
>
> LFS


I mislead you with the word 'referenced'. I meant 'used in code' as in
controla on a forms that are no longer needed.

 |  Next  |  Last
Pages: 1 2 3 4
Prev: 7-bit and News Servers
Next: Eternal September Rocks!