>How to use "Writemethod"?Could u give a sample?it's used in design mode only! But I want to write the method in run mode,who can help me? thxk
Lu,
As documents say it's for designtime only and typically used by builders.
If you have VFP6 SP3 or later you can write code at run time in a different way :
*CodeRunner - custom method written at design time
lparameters tcMethodCode, tcParamStr
local lcFile
lcFile=sys(2015)
StrToFile(tcMethodCode, lcFile)
compile (lcFile)
luRetValue = &lcFile.(&tcParamStr.)
erase (lcFile+'.*')
return luRetValue
Also if it's needed you could compile other things like class, form etc (check help on compile).
Cetin