Skip to content

Instantly share code, notes, and snippets.

@dflima
Created February 5, 2013 13:07
Show Gist options
  • Select an option

  • Save dflima/4714343 to your computer and use it in GitHub Desktop.

Select an option

Save dflima/4714343 to your computer and use it in GitHub Desktop.
Option Explicit
Private Declare Function FlashWindow Lib "user32" (ByVal hwnd As Long, ByVal bInvert As Integer) As Integer
Private Sub Form_GotFocus()
Timer1.Enabled = False
End Sub
Private Sub Form_Resize()
If Me.WindowState = vbMinimized Then
Timer1.Interval = 500
Timer1.Enabled = True
Else
Timer1.Enabled = False
End If
End Sub
Private Sub Timer1_Timer()
Dim success As Long
success = FlashWindow(Me.hwnd, 5)
End Sub
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment