コード例 #1
0
 public static IEnumerable <string> EnumerateAll()
 {
     foreach (var winSta in WindowStation.Enumerate())
     {
         foreach (var desktop in Desktop.Enumerate(winSta))
         {
             foreach (var window in Window.Enumerate(desktop))
             {
                 yield return($"{winSta}, {desktop}, {window}");
             }
         }
     }
 }
コード例 #2
0
 public static new IEnumerable <Window> EnumerateAll()
 {
     foreach (var winSta in WindowStation.Enumerate())
     {
         foreach (var desktop in Desktop.Enumerate(winSta))
         {
             foreach (var window in Window.Enumerate(desktop))
             {
                 if (window.ClassName == DialogClassName)
                 {
                     yield return(window);
                 }
             }
         }
     }
 }