• 0

[C#] List of all open windows


Question

8 answers to this question

Recommended Posts

  • 0

Just to point you in the right direction, I believe you have to use the win api to get the list of open windows. Take a look at EnumWindows in the user32.dll

Link to comment
Share on other sites

  • 0

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?

Link to comment
Share on other sites

  • 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.

Link to comment
Share on other sites

  • 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

Link to comment
Share on other sites

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

    • No registered users viewing this page.