for Push.

This commit is contained in:
nobobo
2026-06-01 13:23:34 +09:00
parent 9e093ea99f
commit a6550e9928
93 changed files with 10393 additions and 0 deletions
+38
View File
@@ -0,0 +1,38 @@
using System.Runtime.InteropServices; // これが必要!
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace KssSmaPlaLib.Alert
{
// --- ここからコピー ---
[StructLayout(LayoutKind.Sequential)]
public struct FLASHWINFO
{
public uint cbSize; public IntPtr hwnd; public uint dwFlags;
public uint uCount; public uint dwTimeout;
}
public static class WindowFlasherUxer
{
[DllImport("user32.dll")]
[return: MarshalAs(UnmanagedType.Bool)]
private static extern bool FlashWindowEx(ref FLASHWINFO pwfi);
public const uint FLASHW_ALL = 3; // タスクバーとウィンドウ両方
public const uint FLASHW_TIMERNOFG = 12; // 最前面に来るまで点滅し続ける
public static void Flash(IntPtr hWnd)
{
FLASHWINFO fInfo = new FLASHWINFO();
fInfo.cbSize = Convert.ToUInt32(Marshal.SizeOf(fInfo));
fInfo.hwnd = hWnd;
fInfo.dwFlags = FLASHW_ALL | FLASHW_TIMERNOFG;
fInfo.uCount = uint.MaxValue; // 無限に点滅
fInfo.dwTimeout = 0;
FlashWindowEx(ref fInfo);
}
}
}