Invoking of the QureyClose event throug button

i have two option to close the window such as 1) On click of the “Close” button 2) On click of the “X”(cross) of Windows bar properties.

i want to call the Query Close event only on the Click of the Close button , Please give a brief solution.

Subject: Invoking of the QureyClose event throug button .

you’d have to set a field when you click the button like CloseButtonPressed := 1

and then you test it in the QueryClose event

if source.document.CloseButtonPressed(0) = 1 then

end if