Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to "Tile" an array of window elements
#1
Hello,

I have been trying to find a way to "tile" an array of windows based on the screen resolution and just can't figure it out.  

Thus far I have put the following together. The example below uses notepad.exe, but my use case is a different application.  
 
Code:
Copy      Help
 
using System.Windows;
using System.Collections.Generic;

var r = screen.primary.Rect;


//print.it(r.Width);
//print.it(r.Height);



var windows = wnd.findAll(cn: "Notepad", of: "notepad.exe");

var count = windows.Length;
//print.it(count);



int width = r.Width/count;
print.it(width);

int height = r.Height/count;
print.it(height);
int x = 0;
int y = 10;



for (int i = 0; i < count; i++) {
print.it(windows[i]);
windows[i].Resize(width,height);
windows[i].MoveInScreen(x,y);
x = x + ???;
y = y + ???;
}
If anyone has so input on this I would be very thankful Smile


Messages In This Thread
How to "Tile" an array of window elements - by mattmc81 - 09-20-2022, 07:32 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)