>Hi
>
>How can I add a method at design time programatically?
>It's for a builder
No way. I'm fighting that one for four years, third version of Fox now. The only way is to add the code (including the PROCEDURE and ENDPROC lines) to the Methods memo of the .scx, add the proper line to the Reserved3 field, blank the ObjCode field, close the form (opened as a table) and compile it. Then you can reopen it. Not something you can do from a builder. Even VFP's converter from 2.6 forms doesn't build objects, it creates the .scx file as a table and does some crunching and munching with it.
For details, you can download Alejandro Sosa's converter, recently updated, from the Files section, and see how does it work there. I didn't look at it recently, but I figure it still uses this technique.
Alternate way would be to somehow instantiate the Edit property/method or New Method forms (accessible from the menu while editing form or a class), which I never succeeded.