De hecho, y gracias a tu inestimable ayuda he mezclado tus códigos y he añadido algo hasta que ha quedado a mi gusto.
Reitero nuevamente mi agradecimiento porque sólo no podría haberlo hecho.
Código Delphi
[-]procedure TForm1.MMouseEvent(var Msg: TMsg; var Handled: Boolean);
{$J+}
const InZD: Boolean = False;
{$J-}
var
P, PP: TPoint;
WControl: TWinControl;
G: TDBGrid;
ZD, i: Integer;
begin
WControl:= FindVCLWindow(Mouse.CursorPos); if Assigned(WControl) and (WControl is TDBGrid) then begin
P:= ScreenToClient(Mouse.CursorPos); G:= TDBGRid(WControl);
ZD:= GetSystemMetrics(SM_CXVSCROLL); if (P.X < G.Left + ZD) and not InZD then for i:= G.Columns.Count-1 downto G.SelectedIndex do
begin
PP := ScreenToClient(Mouse.CursorPos);
if pp.x <> p.x then exit;
SendMessage(G.Handle, WM_HSCROLL, SB_LINELEFT, 0);
sleep(100);
end;
if (P.X > G.Left + G.Width - ZD) and not InZD then for i:= G.SelectedIndex to G.Columns.Count-1 do begin
PP := ScreenToClient(Mouse.CursorPos);
if pp.x <> p.x then exit;
SendMessage(G.Handle, WM_HSCROLL, SB_LINERIGHT, 0);
sleep(100); end;
InZD:= (P.X < G.Left + ZD) or (P.X > G.Left + G.Width - ZD);
end;
end;