Is it possible in any way to make the dbgrid follow the scroll button on the mouse all the way down?? When it gets down to the last line in the grid it stops, why doesnt it go all the way down to the end of the grid! when using the scroll??

Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Mouse wheel behaves strangely with dbgrids - this code handler will correct this behavior.

Just drop a TApplication component on a form.

procedure Application1.OnMessage
  (var Msg: TMsg; var Handled: Boolean);
  i: SmallInt;
  if Msg.message = WM_MOUSEWHEEL then
    Msg.message := WM_KEYDOWN;
    Msg.lParam := 0;
    i := HiWord(Msg.wParam);
    if i > 0 then
      Msg.wParam := VK_UP
      Msg.wParam := VK_DOWN;

    Handled := False;

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
tscooter82Author Commented:
Thx, mate! Exactly what i needed!
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.