>Hi.
> I am using a *.scx file and I display my form like this
>
> PUBLIC myform
> DO FORM myform LINKED
>.........
>&& I assume here that myform variable will be pointing to myform form && object
>
>However in another *.prg file, I have these statements
>
> CLEAR
>
> myform.Draw
>
>I get an error when I call myform.Draw saying that there is no method called Draw. However in VFP 3.0 the help file says yes there is.
>
>Help! :)
>Ian
Ian,
You missed the syntax in fact but however since VFP assigns scx name as objectname in this case myForm was referring to your form (with multipl instances you would be always referring to first instance if you use scxname as objecname). So I couldn't get why you got the error either but luckily it prevented you from using objectref and draw wrongly :
DO FORM myform NAME oMyForm LINKED
....
oMyForm.refresh
Instead of "Clear" now fortunately we have "cls" method :
oMyForm.cls
Cool, it only clears out extra prints, lines drawn etc and other controls available when form inited remains intact (no need to draw, paint, refresh).
With "clear" you would be lost in space, it would clear out everything including labels, grids, commandbuttons etc. and worse draw, refresh, paint wouldn't help to restore them (BUT just a
?"" DOES RESTORE in VFP5 !).
To be true I haven't yet found a place for draw and paint (sure I know I will need them in very special cases).
PS: You could "activate screen" and ? results there (I do sometimes for debugging).
Cetin