Simon Mourier's Avatar
Simon Mourier's blog (1346 answers on StackOverflow) about Microsoft technologies C#, C/C++, .NET, WinRT, WinUI, COM, Interop, DirectX, Direct2D, Windows, ...
  • 🔎︎ Search
  • Categories
  • Archives
  • About Me
  • c#
  • winapi

Windows API getting HWND

Mar 20, 2011 See the question and my original answer on StackOverflow

I suggest you use UI Automation instead of raw Windows API. You should start with the UI Spy tool to determine the UI hierarchy of your app, it will be more resilient to change.

See some articles on this subject on SO:

Retrieve current URL from C# windows forms application

How to get the word under the cursor in Windows?

  • SmoBlog © 2010-2025 Simon Mourier. All rights reserved.
  • Privacy & Terms