>Hi all
>
>Need help with error message from code below
>I get error message - "One of the members of this class is based on a non visual Class.cannot write .VCX file"
>the same thing happens with any class I define.
>
>I expected to define a class, place it on a form and the save that class
>
>Code.....
>oOb = createObject("form")
>With oOb
>.visible = .T.
>.addobject("testCont1","testCont")
>
>with .testCont1
>.visible = .T.
>wait
>.SaveAsClass("c:\myClasses\Test" ,"testCont1" )
>endwith
>Endwith
>
>Define CLASS testCont AS container
>procedure click
>? "clicked"
>endproc
>Enddefine
>
>Return
>
>tia
>John Harriss
John,
Wish that could be done this way. As in help :
"Note You can use the SaveAsClass method only if the class originates from a class library (.VCX)."
Create the form and container visually in designer and choose file\saveasclass. Later you might change at runtime and call SaveAsClass (I do that for grids to have layout as I want or generate multipl grids from different SQL - except width).
Cetin