Instead of changing icons you can use the Windows API FlashWindowEx function to flash your application's taskbar button.
For example, in a Windows Forms Application -
Example code -
Public Class Form1
Public FW_TRAY As Integer = 2
Public FW_TIMER As Integer = 4
Public FW_STOP As Integer = 0
<StructLayout(LayoutKind.Sequential)>
Public Structure FLASHWINFO
Public cbSize As Integer
Public hwnd As IntPtr
Public flags As Integer
Public count As Integer
Public timeout As Integer
End Structure
<DllImport("user32.dll", CallingConvention:=CallingConvention.StdCall, ExactSpelling:=True)>
Public Shared Function FlashWindowEx(fwi As FLASHWINFO) As Boolean
End Function
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
Dim fwinfo As FLASHWINFO = New FLASHWINFO()
fwinfo.cbSize = Marshal.SizeOf(Of FLASHWINFO)
fwinfo.hwnd = Handle
fwinfo.flags = FW_TRAY
fwinfo.timeout = 1000
fwinfo.count = 10
FlashWindowEx(fwinfo)
End Sub
End Class