sehnal jsem si proceduru na pohyb oknem, kdyz chcete nastavit BorderStyle na BsNone.
problem je v tom, ze funguje jen kdyz pretahujete uchopenim kdekoliv na formulari.
Kdyz ale pres celej formular roztahnu panel, tak uz pretahovani nefunguje.
Najde se nekdo ,kdo by ji dokazal pozmenit,aby bylo mozno uchopit i kdekoliv na panelu a premistit ??
procedure TForm1.WMNCHitTest(var M: TWMNCHitTest);
begin
inherited;
if M.Result = htClient then M.Result := htCaption;
end;
procedure TForm1.WMNCPaint(var Msg:TWMNCPaint);
var
dc: hDc;
Pen: hPen;
OldPen: hPen;
OldBrush: hBrush;
begin
inherited;
dc := GetWindowDC(handle);
Msg.Result := 1;
Pen := CreatePen(PS_SOLID, 3, RGB (0,0,0));
OldPen := SelectObject(dc, Pen);
OldBrush := SelectObject(dc, GetStockObject(NULL_BRUSH));
Rectangle(dc, 0, 0, Form1.Width, Form1.Height);
SelectObject(dc, OldBrush);
SelectObject(dc, OldPen);
DeleteObject(Pen);
ReleaseDC(Handle, Canvas.Handle);
end;