C# 작업 표시줄 플래시 FlashWindowEx

1991 단어
C# 코드에 Dll 함수 가져오기
[DllImport("user32.dll")]
        static extern bool FlashWindowEx(ref FLASHWINFO pwfi);

        [DllImport("user32.dll")]
        static extern bool FlashWindow(IntPtr handle, bool invert); 
        
         public const UInt32 FLASHW_STOP = 0;
         public const UInt32 FLASHW_CAPTION = 1;
         public const UInt32 FLASHW_TRAY = 2;
         public const UInt32 FLASHW_ALL = 3;
         public const UInt32 FLASHW_TIMER = 4;
         public const UInt32 FLASHW_TIMERNOFG = 12;

작업 표시줄 켜기
this.WindowState = FormWindowState.Minimized; 
 
             FLASHWINFO fInfo = new FLASHWINFO();
 
             fInfo.cbSize = Convert.ToUInt32(Marshal.SizeOf(fInfo));
             fInfo.hwnd = this.Handle;
             fInfo.dwFlags = FLASHW_TRAY | FLASHW_TIMERNOFG;
             fInfo.uCount = UInt32.MaxValue;
             fInfo.dwTimeout = 0;  
             FlashWindowEx(ref fInfo);

작업 표시줄이 계속 켜져 있다
this.WindowState = FormWindowState.Minimized; 
            FlashWindow(this.Handle,true);

 
필기로서 나중에 복사하고 붙여넣어야 한다

좋은 웹페이지 즐겨찾기