$ 0 0 I'm trying to intercept the closing of a window and excute a code inside this but I can't. Can someone explain me where is the best solution?