• 0

[C#] List of all open windows


Question

8 answers to this question

Recommended Posts

  • 0

this is a decent place to start for looking at all the winapi functions: Windows API Reference

Looking at dlls is a different story. I am not that experienced with it, though a tool like dependency walker can help you see some of the functions.

Really the main information you need is in the windows api. All that code is given in C++ and you will have to import the dll and delcare the function in C#, which may be a little advanced for you right now if you are just starting in C#. There are plenty of examples online though, just do some searching.

  • 0

Along these lines, can anyone tell me if there is a way in C# of VB.NET to capture when a window (for any and all apps) opens and closes. I would rather not run a process ever second (or 5, or 10 etc) to see what windows are "now" open and compare.

Thanks

  • 0
  FiREFLi said:
I'm very new to C# and I'm using VS2005 to develop in which is also new to me. How exactly do I look at EnumWindow in user32.dll. Specifically, how to I look in any dll?

http://pinvoke.net/default.aspx/user32.EnumDesktopWindows

There is an example of using user.dll'smWindow in C# to list all open windows.

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.