this.AddObject('linMain', 'Line') this.linMain.Move(10, 10, this.Width - 20, 1) this.linMain.Visible = .t. BINDEVENTS(this.linMain, 'Click', this, 'LineClick')You will need to add a custom method called LineClick to the form (or whatever you want to name it) and in the Destroy method of the form, do something like this:
UNBINDEVENTS(this)HTH,