It appears to be a timing thing. This should work better for you, it does for me, there is no tiling of CDs every instance is opening at 0,0:
for x = 1 to 20
keyboard '{ctrl+W}'
lcclass = 'test' + alltrim(str(x, 3))
create class (lcclass) of test1 as label nowait
activate window "Class Designer"
doevents
endfor
the doevents seems to give the pause or focus necessary for the event handler. I only have VFP6 to test this on at the moment.
>The coding will not work. I have already tried to use activate window in the beginning (see my 1st post of this thread). If you increase the counter from 5 to 20, you will see that the class designers are not closing immediately but in a random order. The first class designer may be the last one being close.