フラッシュウィンドウ(U) <TOP>
タイトルバー・タスクバーを点滅させたい
点滅する箇所を選択できます。
FlashWindowEx ウィンドウタイトル点滅
'================================================================ '= タイトルバー・タスクバーを点滅させる '= (FlashWindowEx.bas) '================================================================ #include "Windows.bi" Type FLASHWINFO cbSize As Long hWnd As Long dwFlags As Long uCount As Long '点滅回数 dwTimeout As Long '点滅間隔(ms) End Type ' 指定されたウィンドウを一度フラッシュする Declare Function Api_FlashWindowEx& Lib "user32" Alias "FlashWindowEx" (pfwi As FLASHWINFO) #define FLASH_STOP &H0 '点滅停止 #define FLASH_CAPTION &H1 'タイトルバーのみ点滅 #define FLASH_TRAY &H2 'タスクバーのみ点滅 #define FLASH_ALL &H1 OR &H2 'FLASH_STOPが呼び出されるまで点滅 #define FLASH_TIMER &H4 'FLASH_STOPが呼び出されるまで点滅 #define FLASH_TIMERNOFG &HC 'ウィンドウがアクティブになるまで点滅 Var Shared Radio1 As Object Var Shared Radio2 As Object Var Shared Radio3 As Object Var Shared Edit1 As Object Var Shared Text1 As Object Var Shared Button1 As Object Radio1.Attach GetDlgItem("Radio1") : Radio1.SetFontSize 14 Radio2.Attach GetDlgItem("Radio2") : Radio2.SetFontSize 14 Radio3.Attach GetDlgItem("Radio3") : Radio3.SetFontSize 14 Edit1.Attach GetDlgItem("Edit1") : Edit1.SetFontSize 14 Text1.Attach GetDlgItem("Text1") : Text1.SetFontSize 14 Button1.Attach GetDlgItem("Button1") : Button1.SetFontSize 14 '================================================================ '= '================================================================ declare Sub MainForm_Start edecl () Sub MainForm_Start() ShowWindow -1 End Sub '================================================================ '= '================================================================ declare Sub Button1_on edecl () Sub Button1_on() Var fw As FLASHWINFO Var Ret As Long '点滅の設定 fw.cbSize = Len(fw) fw.hWnd = GethWnd If Radio1.GetCheck = 1 Then fw.dwFlags = FLASH_CAPTION Else If Radio2.GetCheck = 1 Then fw.dwFlags = FLASH_TRAY Else fw.dwFlags = FLASH_ALL End If fw.uCount = Val(Edit1.GetWindowText) fw.dwTimeout = 500 '点滅実行 Ret = Api_FlashWindowEx(fw) End Sub '================================================================ '= '================================================================ While 1 WaitEvent Wend Stop End