この一見単純な質問に対する答えはどこにも見つからないようです D:
フォーム/ウィンドウがフォーカスされているかどうかを検出して、ウィンドウのみをフラッシュできるようにしたい フォーカスされていない場合は、コードの一部を次に示します。
If Me.Focused = False Then ' Doesn't work D: please fix
Dim flash As New FLASHWINFO
flash.cbSize = System.Runtime.InteropServices.Marshal.SizeOf(flash) '/// size of structure in bytes
flash.hwnd = MyBase.Handle '/// Handle to the window to be flashed
flash.dwFlags = FLASHW_ALL '/// to flash both the caption bar + the tray
flash.uCount = 5 '/// the number of flashes
flash.dwTimeout = 1000 '/// speed of flashes in MilliSeconds ( can be left out )
'/// flash the window you have specified the handle for...
FlashWindowEx(flash)
End If
これを機能させる簡単な方法はありますか?