oFs = createobject('clsFs') read events define class clsFs as formset otb = null procedure init this.AddObject('form1','clsFrm') with this.form1 .height = 200 .width = 300 .show() endwith this.otb = newobject('clsTb') bindevent(this.form1,'destroy',this,'closeTbs',1) this.otb.show() endproc procedure closeTbs wait window "delegate event called" this.otb.release() this.Release() endproc enddefine define class clsFrm as Form * procedure destroy * endproc enddefine define class clsTb as Toolbar add object cmd1 as clsCb enddefine define class clsCb as CommandButton width = 26 height = 24 caption = "H" visible = .t. enddefine