VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Flash a window using FlashWindow API

by Karthikeyan (187 Submissions)
Category: Windows API Call/Explanation
Compatability: Visual Basic 5.0
Difficulty: Unknown Difficulty
Originally Published: Thu 18th January 2001
Date Added: Mon 8th February 2021
Rating: (1 Votes)

Flash a window using FlashWindow API

API Declarations


Private Declare Function FlashWindow Lib "user32.dll" (ByVal hwnd As Long, ByVal wActive As Long) As Long
Private Declare Sub Sleep Lib "kernel32" (ByVal dMilliseconds As Long)


Rate Flash a window using FlashWindow API



Dim i As Integer
Dim handle As Long ' Handle for the active window
Dim rval As Long
handle = GetActiveWindow()  'Get the handle of active window
For i = 1 To 10  ' Flash five times
rval = FlashWindow(handle, 1)  'Flash the window
Sleep 500  ' Delay the execution for 1/2 minute
Next
rval = FlashWindow(handle, 0) ' Bring the window to normal position
End Sub

Download this snippet    Add to My Saved Code

Flash a window using FlashWindow API Comments

No comments have been posted about Flash a window using FlashWindow API. Why not be the first to post a comment about Flash a window using FlashWindow API.

Post your comment

Subject:
Message:
0/1000 characters