'Find a window knowing it's caption using FindWindow API
'Find a window knowing it's caption using FindWindow API
API Declarations
Private Declare Function FlashWindow Lib "user32.dll" (ByVal hwnd As Long, ByVal bInvert As Long) As Long
Private Declare Sub Sleep Lib "kernel32.dll" (ByVal dwMilliseconds As Long)
Rate 'Find a window knowing it's caption using FindWindow API
(1(1 Vote))
'http://www.geocities.com/marskarthik
'http://marskarthik.virtualave.net
'Email: [email protected]
Private Sub Form_Load()
Dim dwnd As Long
Dim rval As Long
Dim i As Integer
'Find a window having caption VBFinished
dwnd = FindWindow(vbNullString, "VBFinished")
If dwnd Then 'If Found
For i = 1 To 10 ' Flash the found window 5 times
rval = FlashWindow(dwnd, 1) 'Flash window
Sleep 300 'Delay
Next
rval = FlashWindow(dwnd, 0) 'Bring to normal
End If
End Sub
'Find a window knowing it's caption using FindWindow API Comments
No comments yet — be the first to post one!
Post a Comment