<p>Is there an API call in .NET or a native DLL that I can use to create similar behaviour as Windows Live Messenger when a response comes from someone I chat with?</p>

[{'answer_id': 73203, 'author': 'Abe Heidebrecht', 'author_id': 9268, 'author_profile': 'https://Stackoverflow.com/users/9268', 'pm_score': 2, 'selected': False, 'text': '<p>The FlashWindowEx Win32 API is the call used to do this. The documentation for it is at:\n<a href="http://msdn.microsoft.com/en-us/library/ms679347(VS.85).aspx" rel="nofollow noreferrer">http://msdn.microsoft.com/en-us/library/ms679347(VS.85).aspx</a></p>\n'}, {'answer_id': 73208, 'author': 'nathaniel', 'author_id': 11947, 'author_profile': 'https://Stackoverflow.com/users/11947', 'pm_score': 2, 'selected': False, 'text': '<pre><code>HWND hHandle = FindWindow(NULL,"YourApplicationName");\nFLASHWINFO pf;\npf.cbSize = sizeof(FLASHWINFO);\npf.hwnd = hHandle;\npf.dwFlags = FLASHW_TIMER|FLASHW_TRAY; // (or FLASHW_ALL to flash and if it is not minimized)\npf.uCount = 8;\npf.dwTimeout = 75;\n\nFlashWindowEx(&amp;pf);\n</code></pre>\n\n<p>Stolen from experts-exchange member gtokas.</p>\n\n<p><a href="http://msdn.microsoft.com/en-us/library/ms679347%28VS.85%29.aspx" rel="nofollow noreferrer">FlashWindowEx</a>.</p>\n'}, {'answer_id': 73209, 'author': 'Skizz', 'author_id': 1898, 'author_profile': 'https://Stackoverflow.com/users/1898', 'pm_score': 0, 'selected': False, 'text': '<p>I believe you\'re looking for <a href="http://msdn.microsoft.com/en-us/library/ms633539.aspx" rel="nofollow noreferrer"><code>SetForegroundWindow</code></a>.</p>\n'}, {'answer_id': 73287, 'author': 'Ian Boyd', 'author_id': 12597, 'author_profile': 'https://Stackoverflow.com/users/12597', 'pm_score': 2, 'selected': False, 'text': '<p>From a Raymond Chen blog entry: </p>\n\n<blockquote>\n  <p><strong><a href="http://blogs.msdn.com/oldnewthing/archive/2008/05/12/8490184.aspx" rel="nofollow noreferrer">How do I flash my window caption and taskbar button manually?</a></strong></p>\n  \n  <p>How do I flash my window caption and\n  taskbar button manually? Commenter\n  Jonathan Scheepers wonders about those\n  programs that flash their taskbar\n  button indefinitely, overriding the\n  default flash count set by\n  SysteParametersInfo(SPI_SETFOREGROUNDFLASHCOUNT).</p>\n  \n  <p>The FlashWindowEx function and its\n  simpler precursor FlashWindow let a\n  program flash its window caption and\n  taskbar button manually. The window\n  manager flashes the caption\n  automatically (and Explorer follows\n  the caption by flashing the taskbar\n  button) if a program calls\n  SetForegroundWindow when it doesn\'t\n  have permission to take foreground,\n  and it is that automatic flashing that\n  the SPI_SETFOREGROUNDFLASHCOUNT\n  setting controls.</p>\n  \n  <p>For illustration purposes, I\'ll\n  demonstrate flashing the caption\n  manually. This is generally speaking\n  not recommended, but since you asked,\n  I\'ll show you how. And then promise\n  you won\'t do it.</p>\n  \n  <p>Start with the scratch program and\n  make this simple change:</p>\n\n<pre><code>void\nOnSize(HWND hwnd, UINT state, int cx, int cy)\n{\n  if (state == SIZE_MINIMIZED) {\n    FLASHWINFO fwi = { sizeof(fwi), hwnd,\n                       FLASHW_TIMERNOFG | FLASHW_ALL };\n    FlashWindowEx(&amp;fwi);\n  }\n}\n</code></pre>\n  \n  <p>Compile and run this program, then\n  minimize it. When you do, its taskbar\n  button flashes indefinitely until you\n  click on it. The program responds to\n  being minimzed by calling the\n  FlashWindowEx function asking for\n  everything possible (currently the\n  caption and taskbar button) to be\n  flashed until the window comes to the\n  foreground.</p>\n  \n  <p>Other members of the FLASHWINFO\n  structure let you customize the\n  flashing behavior further, such as\n  controlling the flash frequency and\n  the number of flashes. and if you\n  really want to take control, you can\n  use FLASHW_ALL and FLASHW_STOP to turn\n  your caption and taskbar button on and\n  off exactly the way you want it. (Who\n  knows, maybe you want to send a\n  message in Morse code.)</p>\n  \n  <p>Published Monday, May 12, 2008 7:00 AM\n  by oldnewthing Filed under: Code</p>\n</blockquote>\n'}, {'answer_id': 73383, 'author': 'dummy', 'author_id': 6297, 'author_profile': 'https://Stackoverflow.com/users/6297', 'pm_score': 6, 'selected': True, 'text': '<p>FlashWindowEx is the way to go. See <a href="http://msdn.microsoft.com/en-us/library/ms679347%28VS.85%29.aspx" rel="noreferrer">here for MSDN documentation</a></p>\n\n<pre><code>[DllImport("user32.dll")]\n[return: MarshalAs(UnmanagedType.Bool)]\nstatic extern bool FlashWindowEx(ref FLASHWINFO pwfi);\n\n[StructLayout(LayoutKind.Sequential)]\npublic struct FLASHWINFO\n{\n    public UInt32 cbSize;\n    public IntPtr hwnd;\n    public UInt32 dwFlags;\n    public UInt32 uCount;\n    public UInt32 dwTimeout;\n}\n\npublic const UInt32 FLASHW_ALL = 3; \n</code></pre>\n\n<p>Calling the Function:</p>\n\n<pre><code>FLASHWINFO fInfo = new FLASHWINFO();\n\nfInfo.cbSize = Convert.ToUInt32(Marshal.SizeOf(fInfo));\nfInfo.hwnd = hWnd;\nfInfo.dwFlags = FLASHW_ALL;\nfInfo.uCount = UInt32.MaxValue;\nfInfo.dwTimeout = 0;\n\nFlashWindowEx(ref fInfo);\n</code></pre>\n\n<p>This was shamelessly plugged from <a href="http://pinvoke.net/default.aspx/user32/FlashWindowEx.html" rel="noreferrer">Pinvoke.net</a></p>\n'}]
['https://Stackoverflow.com/questions/73162', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/6896/']