>>>Is there any way to programically protect or hide a method.
>>
>>As per the help for DEFINE CLASS...
>>
[[PROTECTED | HIDDEN] FUNCTION | PROCEDURE Name[_ACCESS |_ASSIGN]
>>For example,
>>
DEFINE CLASS MyClass AS CUSTOM
>>PROTECTED FUNCTION MyMethod
>>ENDFUNC
>>ENDDEFINE
>
>I hadn't thought about that.
>I'm trying to duplicate a form with a lot of objects in it. I hadn't thought about creating a prg file(s) for the form and all the objects in it, then converting the prg file(s) into vcx file(s), then running a prg that puts them all back together. Lot more work than I planned on, but I'll try and remember that next time I need to do something like this.
Ah, well, that changes things. You want to convert some methods to protected/hidden in a visual class? The class already exists? You can USE the VCX, and then alter the methods memo for the particular classes. Back up the library, first of course, since this usually takes some experimentation to get the conversion right.