修改源码BusinessSkinForm.pas中一个函数即可:
function TbsBusinessSkinForm.NewDefNCHitTest;
const
Offset = 2;
var
CR: TRect;
begin
if (FWindowState = wsMaximized) or FRollUpState or not IsSizeAble or
(FWindowState = wsMinimized)
then
with FForm do
begin
CR := GetDefCaptionRect;
if PtInRect(CR, P)
then
Result := HTCAPTION
else
if PtInRect(Rect(3, GetDefCaptionHeight + 3, Width - 3, Height - 3), P)
then
Result := HTCLIENT
else
Result := HTNCACTIVE;
end
else
if (ActiveObject <> -1)
then
begin
Result := HTNCACTIVE;
end
else
with FForm do
if (P.X <= Offset) and (P.Y <= Offset)
then
Result := HTTOPLEFT
else
if (P.X >= Width - Offset) and (P.Y <= Offset)
then
Result := HTTOPRIGHT
else
if (P.X <= Offset) and (P.Y >= Height - Offset)
then
Result := HTBOTTOMLEFT
else
if (P.X >= Width - Offset) and (P.Y >= Height - Offset)
then
Result := HTBOTTOMRIGHT
else
if (P.X <= Offset)
then
Result := HTLEFT
else
if (P.Y <= Offset)
then
Result := HTTOP
else
if (P.X >= Width - Offset)
then
Result := HTRIGHT
else
if (P.Y >= Height - Offset)
then
Result := HTBOTTOM
else
begin
CR := GetDefCaptionRect;
if PtInRect(CR, P)
then
Result := {HTCAPTION}HTCLIENT //修改这里
else
if PtInRect(Rect(3, GetDefCaptionHeight + 3, Width - 3, Height - 3), P)
then
Result := HTCLIENT
else
Result := HTNCACTIVE;
end
end;
本人用BSF4.40版试验通过。