[C#/WIN32] FlashWindowEx API 함수 선언하기
■ FlashWindowEx API 함수를 선언하는 방법을 보여준다. ▶ 예제 코드 (C#)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 |
using System; using System.Runtime.InteropServices; #region 윈도우 작업 표시줄 깜박이기 - FlashWindowEx(info); /// <summary> /// 윈도우 작업 표시줄 깜박이기 /// </summary> /// <param name="info">윈도우 작업 표시줄 깜박이기 정보</param> /// <returns>처리 결과</returns> [DllImport("user32")] private static extern int FlashWindowEx(ref FLASHWINFO info); #endregion #region 윈도우 깜박이기 정보 - FLASHWINFO /// <summary> /// 윈도우 깜박이기 정보 /// </summary> [StructLayout(LayoutKind.Sequential)] public struct FLASHWINFO { //////////////////////////////////////////////////////////////////////////////////////////////////// Field ////////////////////////////////////////////////////////////////////////////////////////// Public #region Field /// <summary> /// 크기 /// </summary> public uint Size; /// <summary> /// 윈도우 핸들 /// </summary> public IntPtr WindowHandle; /// <summary> /// 플래그 /// </summary> public uint Flag; /// <summary> /// 카운트 /// </summary> public uint Count; /// <summary> /// 타임아웃 /// </summary> public uint Timeout; #endregion } #endregion /// <summary> /// FLASHW_STOP /// </summary> private const uint FLASHW_STOP = 0; /// <summary> /// FLASHW_CAPTION /// </summary> private const uint FLASHW_CAPTION = 1; /// <summary> /// FLASHW_TRAY /// </summary> private const uint FLASHW_TRAY = 2; /// <summary> /// FLASHW_ALL /// </summary> private const uint FLASHW_ALL = 3; /// <summary> /// FLASHW_TIMER /// </summary> private const uint FLASHW_TIMER = 4; /// <summary> /// FLASHW_TIMERNOFG /// </summary> private const uint FLASHW_TIMERNOFG = 12; |