Hi,
i have an application where multiple Windows are open at once.
I have written a function to align and resize them, to show all at once in a grid like layout.
The code looks like this:
This works great, but when I try to move or resize the windows after this function, the window jumps to the position it had before I ran the function and moves/resizes there although my mouse cursor moves in the area where I initially clicked.
Is there a better way to move windoes than Canvas.Top/Left or is there a way how I can tell the windows to forget theri old positions?
thanks in advance
Lukas
i have an application where multiple Windows are open at once.
I have written a function to align and resize them, to show all at once in a grid like layout.
The code looks like this:
(AllWindows is a list of all my windows; here used in a for-loop)AllWindows(i).myProductWindow.Height = can_Desktop.RenderSize.Height
AllWindows(i).myProductWindow.Width = (can_Desktop.RenderSize.Width / 2) - 5
Canvas.SetTop(AllWindows(i).myProductWindow, getPosition(can_Desktop).topLeft.Y)
Canvas.SetLeft(AllWindows(i).myProductWindow, i * (can_Desktop.RenderSize.Width / 2))
This works great, but when I try to move or resize the windows after this function, the window jumps to the position it had before I ran the function and moves/resizes there although my mouse cursor moves in the area where I initially clicked.
Is there a better way to move windoes than Canvas.Top/Left or is there a way how I can tell the windows to forget theri old positions?
thanks in advance
Lukas