How do I find all windows using C#?

前端 未结 5 1778
花落未央
花落未央 2021-01-14 14:52

There is Win32 functions for finding windows on a system:

[DllImport(\"user32.dll\", SetLastError = true)]
public static extern IntPtr FindWindow(string lpCl         


        
5条回答
  •  甜味超标
    2021-01-14 15:35

    I'm sure this question has been asked here a million times before. But, you merely need to use EnumWindows to get the top-level windows and then EnumChildWindows for all the children.

提交回复
热议问题