|
Липкие окошки
|
| WorkArea: TRect;
|
| StickAt : Word;
|
| StickAt := 10;
|
| SystemParametersInfo(SPI_GETWORKAREA, 0, @WorkArea, 0);
|
| with WorkArea, Msg.WindowPos^ do
|
| begin
|
| // Сдвигаем границы для сравнения с левой и верхней сторонами
|
| Right:=Right-cx;
|
| Bottom:=Bottom-cy;
|
| if abs(Left - x) <= StickAt then x := Left;
|
| if abs(Right - x) <= StickAt then x := Right;
|
| if abs(Top - y) <= StickAt then y := Top;
|
| if abs(Bottom - y) <= StickAt then y := Bottom;
|
| end;
|
| inherited;
|