⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 tooltip.py

📁 bittorrent source by python. please enjoy
💻 PY
字号:
import win32guiTTS_BALLOON = 0x40WM_USER = 1024WM_TRAYMESSAGE = WM_USER + 20def _get_nid(hwnd, id, flags, callbackmessage, hicon, title, msg):        nid = (hwnd, id, flags, callbackmessage, hicon)        nid = list(nid)        nid.append('') # the tip        nid.append(msg) # the balloon message        nid.append(15000) # the timeout        nid.append(title) # the title        nid.append(win32gui.NIIF_INFO) # also warning and error available        return tuple(nid)_hwnd = Nonedef find_traywindow_hwnd():    global _hwnd    if _hwnd is None:        try:            _hwnd = win32gui.FindWindowEx(0, 0, 'wxWindowClassNR', '')        except:            pass    return _hwnddef SetBalloonTip(hicon, title, msg):    hwnd = find_traywindow_hwnd()    id = 99 # always 99    flags = win32gui.NIF_MESSAGE | win32gui.NIF_ICON | win32gui.NIF_INFO    callbackmessage = WM_TRAYMESSAGE    nid = _get_nid(hwnd, id, flags, callbackmessage, hicon, title, msg)    try:        win32gui.Shell_NotifyIcon(win32gui.NIM_MODIFY, nid)    except:        pass

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -