>I want to use WITH .... ENDWITH with different objects that will be defined at the rum-time. How can I do that?
Try something like this:
LOCAL loMyObject AS MyObject OF MyClass.vcx
loMyObject = thisform.AddObject("MyObject","MyClass")
WITH loMyObject
...
ENDWITH