Python-win32con.FLASHW_*标志
G'day,Python-win32con.FLASHW_*标志,python,win32gui,Python,Win32gui,G'day, 在他的链接中有win32gui.FlashWindowEx()的文档,我已经设法使用了它 import win32gui as w a = w.GetForegroundWindow() #just get the handler/ID for the current window w.FlashWindowEx(a,0,5,1000) #many variations of the 5,1000 have been tried 但在Windows 7任务栏中发生的一切是图标获得
在他的链接中有win32gui.FlashWindowEx()的文档,我已经设法使用了它
import win32gui as w
a = w.GetForegroundWindow() #just get the handler/ID for the current window
w.FlashWindowEx(a,0,5,1000) #many variations of the 5,1000 have been tried
但在Windows 7任务栏中发生的一切是图标获得金色背景,而不是闪烁,所以我的问题是,有人知道win32con.FLASHW_*标志吗?文档中提到了,可能是指向它们的更多信息的链接?干杯有关Visual Basic版本的
FlashWindowEx
功能的更多信息,请访问Microsoft的支持端
该页面包括FLASHW.*
标志的列表。请参阅:
from ctypes import *
import win32con
import win32gui as w
cur_window = w.GetForegroundWindow() #just get the handler/ID for the current window
class FLASHWINFO(Structure):
_fields_ = [('cbSize', c_uint),
('hwnd', c_uint),
('dwFlags', c_uint),
('uCount', c_uint),
('dwTimeout', c_uint)]
def flash(hwnd):
'''Flash a window with caption and tray.'''
info = FLASHWINFO(0, hwnd, win32con.FLASHW_ALL | win32con.FLASHW_TIMERNOFG, 0, 0)
info.cbSize = sizeof(info)
FlashWindowEx(byref(info))
flash(cur_window)