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

    • How to enable the redesigned Windows 11 Start menu by Taras Buria This week, Microsoft started testing a big redesign for Windows 11's Start menu. It is now rolling out to Windows Insiders in the Dev and Beta Channels, addressing quite a few pain points in the original Start menu, which was shipped in late 2021. Nearly four years later, we finally have the long-anticipated redesign (announced earlier this year). The updated menu now features a single-page view, with all your pins and apps on one scrollable page. You can change the list of all apps between three variants: list, grid, and category. More importantly, you can now hide the recommended section in the Start menu settings (one of the most requested Start menu-related changes). The new Start menu is available in this week's Dev and Beta update. However, like always, Microsoft is rolling out changes gradually, which means you might not have the lucky ticket even on the latest build. If you do not want to wait, you can force-enable the new Start menu and its Phone Link button using a few commands in the ViVeTool app. Here is how to do that: Download ViveTool from GitHub and unpack the files in a convenient and easy-to-find folder. Run Command Prompt as Administrator and navigate to the folder containing the ViveTool files with the CD command. For example, if you have placed ViveTool in C:\Vive, type CD C:\Vive. Type vivetool /enable /id:47205210,49221331,49381526,49402389,49820095,55495322,48433719 and press Enter. Restart your computer. As usual, keep in mind that stuff in preview builds is less stable, so be aware of the risks of running preview builds. While Microsoft is not saying when the new Start menu will be available to all users, it will probably not take too long before it shows up in Release Preview and non-security updates. By the way, if you are curious, check out some of the prototypes that Microsoft considered when designing the new Start menu. Credit for the IDs goes to @phantomofearth on X.
    • reddit's "bottom of the barrel" > 99% of neowin front page "news"
    • Mozilla has decided to pander to certain specific crowd. I was a die hard firefox fan until the latest CEO decisions came to affect the browser quality. Had to move to another, sadly, chromium based browser.
    • I don't know if its just me,but I found the "frosted" glass effect to be much better looking in macOS than iOS and iPadOS
    • The Start menu is a defining UI element that made Windows, well, Windows. naturally people will be worked up to any changes it receives.
  • Recent Achievements

    • Week One Done
      IAMFLUXX earned a badge
      Week One Done
    • One Month Later
      Æhund earned a badge
      One Month Later
    • One Month Later
      CoolRaoul earned a badge
      One Month Later
    • First Post
      Kurotama earned a badge
      First Post
    • Collaborator
      Carltonbar earned a badge
      Collaborator
  • Popular Contributors

    1. 1
      +primortal
      506
    2. 2
      ATLien_0
      268
    3. 3
      +FloatingFatMan
      237
    4. 4
      +Edouard
      201
    5. 5
      snowy owl
      162
  • Tell a friend

    Love Neowin? Tell a friend!