I still wonder about your motivation to want a class defintion as a kind of attribute of a form and the idea that comes to mind is you want to give a class a scope and be able to reuse the same class name with different implementations for each form. But the main main concept for that would be a template class and a specialisation for each form. You can always do the last specialisation step in the instance of the class you put on a form (or any other containing class or instaance), so if you don't use AddObject, but really drag a test class onto your form (its base class just has to be something you can drag into a form, but a custom class is ok, or a container), you can implement code in its methods, that overrides class code, but still can inherit the class code by DODEFAULT() or by not writing anything into the instance you dragged on the form. You can also use THISFORM and references to all the surrounding objects/instances (This.Parent.othertextbox) on the form. It can be good, it can cause too many dependencies, but you surely want objects to not interact on certain levels.
If you think about a unit testing class that will do things very individually depending on which form you test, you actually test the form and don't need a class for this, you define a test as a series of calls and assertions the call results have to fulfill. A test could be based on a test class, but you would define a general template test class with base methods you want to use in any form, eg openform, closeform, things any form has to fulfill and you'd define that template tester class outside of any context and scope, not within a form.
The other thing, which comes to mind is namespaces, but that's about scoping in a different sense. In .NET classes of a certain namespace can easier avoid double names by specifying/referencing other classes of the same namespace, also some properties and methods can have a privacy in this scope of the namespace, only be usable by the family of classes of the same namespace, but in general you can use a class instance everywhere, also in other namespaces. Eg there are car classes in the namespace of a make, and the preamble "car" can also define a namespace for anything car related, but it's not meant for exclusion For example you want to be able to sit in a car, so you want to be able to have a seat object in a car, also if a seat comes from the namespace of furniture and not of cars.
I still don't see, why you would want to define a class in the context of a form. Just for the easier modularization, being able to hand out one SCX and all any user or other developer needs is included in there? That's against a very genral idea of loose coupling. In the final level you want to combine class instances objects to the more complex overall "thing", eg control or form or application, but every single part/class should have a separate concern and very specifically do one job very good, that is reusable.
Waht you want to define is very specifically working fopr a single form only and by that definition not reusable, there is no need for a class in that moment.
Bye, Olaf.