>Fabio,
>
>Sorry I missed your replies. I don't understand a bit anyway.
>
>We had code in page actiavate and it was working. However, I think, it should be in Deactivate. This is my current code in the Deactivate:
>
>
>local lnAnswer
>if thisform.IsChanged()
> lnAnswer = thisform.AskToSave()
> do case
>*!* CASE lnAnswer = IDYES
>*!* THISFORM.SAVE()
>*!* CASE lnAnswer = IDNO
> case lnAnswer = IDCANCEL
> nodefault
> endcase
>endif
>
>Very simple. However, it's firing even if I click on the same page.
>
>I think, I need to find mouse positions and check, what text is under mouse. The problem is, that pages do not have top and left properties... :( So, how would I know which page did I click?
>
OBJTOCLIENT(m.this,1) and OBJTOCLIENT(m.this,2)
return Page.Top and Page.Left.
But they don't serve you to nothing,
because all the tabs are of the Pageframe object,
and under you always have you the page ativa, that is This!
To distinguish a click on the Tab1 from that on the Tab2, is not easy in general!