local llReturn do case case not pemstatus(This, '__VFPSetup', 5) This.AddProperty('__VFPSetup', 0) case This.__VFPSetup = 2 This.__VFPSetup = 0 return endcase llReturn = dodefault() *** Setup code: DO NOT REMOVE *** End of Setup code: DO NOT REMOVE if This.__VFPSetup = 1 This.__VFPSetup = 2 endif return llReturn... and your AutoOpen Should be like:
*** Setup code: DO NOT REMOVE if not pemstatus(This, '__VFPSetup', 5) This.AddProperty('__VFPSetup', 1) This.Init() endif *** End of Setup code: DO NOT REMOVEThe code is structured the way it is because the order of event firing is NOT what you expect. Please read the comments at the beginning of the CABuilder.prg file for help on how to add a CA subclass from the VCX to a DE.