David,
Why aren't you using the form designer itself? What code are you wanting to add? If this is relatively consistent code you sould use a class.
>I am generating a form with
>
>form1 = Createobject("FORM")
>....
>
>
>and later saving as
>
>form1.saveas('formname')
>
>I like to add some code in init, load and my own defined methods. The example code of addobject use a class to add code. Can I do it without using a class?