You can't do it for classes. A class is a description of an object. A
class doesn't have a property that you can change the value of; only an
instantiated object has any run-time data (ignoring reflection data for
now).
So, to summarize, you want a way of noting which form types a given user is
allowed to create and which ones he is not allowed to create, yes? It seems
to me that a list of Type that includes those form types that the user can
create, against which each new attempt to create a form is checked makes
more sense. This does not involve enumerating all forms, by the way.
Paul T.
Clear that up a bit. You want to enumerate all of the form *types* that
are
in loaded assemblies? That is, distinguish for us whether you're talking
about objects (actual instances), or classes. It would probably be a good
idea to tell us *what* you're trying to do, also, not just how you've
decided to do it.
Paul T.
- Show quoted text -
Well. I need to set the Tag property in all controls and forms (Tag=1
--> the control/form is enabled for the current user, Tag=0 --> the
control/form is disabled for the current user).
For the controls into forms i can set the Tag with the For...Each
instruction:
for ctrl as control in frmMain.controls then...
but for the forms ? I'm talking about classes (but i think is not very
important because my application show all the forms at startup and do
not never close them, therefore we can talking about objects).
I hope now is clear, thanks!
Ale