Practical Web Programming

Thursday, February 07, 2008

How to Flash a Minimized Form in the Taskbar Using API in Visual Basic

Here's a simple function to to flash a minimized form in the taskbar. It uses the FlashWindow API function and is written in Visual Basic

'-->API DECLARATION
Public Declare Function FlashWindow Lib "user32" (ByVal hWnd As Long, _
ByVal bInvert As Long) As Long

'-->THIS SUB WILL FLASH THE MINIMIZED FORM IN THE TASKBAR
Public Sub FlashForm(lngHandle As Long, _
Optional intCount As Integer = 1)
Dim intX As Integer

For intX = 0 To intCount
Call FlashWindow(lngHandle, True)
Next
End Sub

0 comments:

Recent Post