- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32
- 33
- 34
- 35
- 36
- 37
procedure TForm1.WMNCHitTest(var M: TWMNCHitTest);
var
P: TPoint;
Left, Right, Top, Bottom: Boolean;
begin
P := ScreenToClient(SmallPointToPoint(M.Pos));
Left := (P.X < 5) and not (akLeft in Anchors);
Right := (P.X > Width - 5) and not (akRight in Anchors);
Top := (P.Y < 5) and not (akTop in Anchors);
Bottom := (P.Y > Height - 5) and not (akBottom in Anchors);
M.Result := HTCLIENT;
if Left then
if Top then
M.Result := HTTOPLEFT
else
if Bottom then
M.Result := HTBOTTOMLEFT
else
M.Result := HTLEFT
else
if Right then
if Top then
M.Result := HTTOPRIGHT
else
if Bottom then
M.Result := HTBOTTOMRIGHT
else
M.Result := HTRIGHT
else
if Top then
M.Result := HTTOP
else
if Bottom then
M.Result := HTBOTTOM;
end;
Говногость 31.08.2009 15:14 # 0
Arch 31.08.2009 15:44 # +1
Или ты не в курсе, что иногда стиль формы меняют осознанно?
viktorious 31.08.2009 15:53 # +1
guest 31.08.2009 20:46 # 0
guest 11.12.2009 18:57 # 0
guest 07.04.2010 07:18 # 0
guest 27.02.2015 21:41 # 0
Юзайте...
guest 27.02.2015 21:43 # 0