Zitat von
DieHardMan:
für den bildschirmrand
Code:
private
{ Private declarations }
procedure WMWindowPosChanging(var Message: TWMWINDOWPOSCHANGING);
message WM_WINDOWPOSCHANGING;
procedure TForm1.WMWindowPosChanging(var Message: TWMWINDOWPOSCHANGING);
const
distance = 10;
begin
{ Obere und untere Festerkante }
if (Message.WindowPos.y <= distance) AND
(Message.WindowPos.y >= -distance) then
Message.WindowPos.y := 0
else
if (Message.WindowPos.y + Height > (Screen.WorkAreaHeight - distance)) AND
(Message.WindowPos.y + Height < (Screen.WorkAreaHeight + distance)) then
Message.WindowPos.y := Screen.WorkAreaHeight - Height;
{ Linke und rechte Fensterkante }
if (Message.WindowPos.x <= distance) AND
(Message.WindowPos.x >= -distance) then
Message.WindowPos.x := 0
else
if (Message.WindowPos.x + Width > (Screen.WorkAreaWidth - distance)) AND
(Message.WindowPos.x + Width < (Screen.WorkAreaWidth + distance)) then
Message.WindowPos.x := Screen.WorkAreaWidth - Width;
end;
Kann mir einer sagen, wie ich diese procedure so aufrufe, daß das Programm z.b. unten am Bildschirmrand andockt?