def stop(self):
if getattr(self, 'hook', None) is not None:
del self.hook
if self.HWND is not None:
win32gui.Shell_NotifyIcon(win32gui.NIM_DELETE, (self.HWND, 0))
# win32gui.PostMessage(self.HWND, win32con.WM_CLOSE, 0, 0)
win32gui.DestroyWindow(self.HWND)
self.HWND = None
self.clear_instance_check_event()
super(KeyCounter, self).stop()
raise SystemExit(0)
评论列表
文章目录