def OnDestroy( self, hwnd, msg, wparam, lparam, ): nid = (self.hwnd, 0) win32gui.Shell_NotifyIcon(win32gui.NIM_DELETE, nid)