VERSION 5.00 Begin VB.Form Form1 Caption = "ウインドウのタイトルバーを点滅させる" ClientHeight = 1545 ClientLeft = 60 ClientTop = 345 ClientWidth = 4680 LinkTopic = "Form1" ScaleHeight = 1545 ScaleWidth = 4680 StartUpPosition = 2 '画面の中央 Begin VB.CommandButton Command1 Caption = "テスト" Height = 735 Left = 960 TabIndex = 0 Top = 480 Width = 2655 End End Attribute VB_Name = "Form1" Attribute VB_GlobalNameSpace = False Attribute VB_Creatable = False Attribute VB_PredeclaredId = True Attribute VB_Exposed = False 'FlashWindow=>ウィンドウのキャプションバーを白黒表示(フラッシュ)させる '<引数> 'hWnd: ウィンドウのハンドル 'bInvert: 1の場合、FlashWindow を呼び出すたびにウィンドウがアクティブ、非アクティブになる ' 0の場合、ウィンドウは初期状態になる '@戻り値@ 'アクティブの時 : 1 'アクティブではない時 : 0 Private Declare Function FlashWindow Lib "user32" (ByVal hWnd As Long, ByVal bInvert As Long) As Long 'GetTickCount =>システムが起動してからの経過時間を取得する '<引数> ' なし '@戻り値@ ' ミリ秒 Private Declare Function GetTickCount Lib "kernel32" () As Long Private Sub Command1_Click() Dim ZZZ As Long Dim YYY As Long For i = 0 To 5 YYY = GetTickCount Do Until GetTickCount() > YYY + 200 Loop ZZZ = FlashWindow(Form1.hWnd, True) Next i End Sub