Solved

Stupid DBGRID

Posted on 2003-11-10
2
290 Views
Last Modified: 2010-08-05
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??

PLZ HELP!
0
Comment
Question by:tscooter82
2 Comments
 
LVL 2

Accepted Solution

by:
SaLz earned 25 total points
ID: 9736073
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);
var
  i: SmallInt;
begin
  if Msg.message = WM_MOUSEWHEEL then
  begin
    Msg.message := WM_KEYDOWN;
    Msg.lParam := 0;
    i := HiWord(Msg.wParam);
    if i > 0 then
      Msg.wParam := VK_UP
    else
      Msg.wParam := VK_DOWN;

    Handled := False;
  end;
end;
0
 

Author Comment

by:tscooter82
ID: 9737825
Thx, mate! Exactly what i needed!
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…

726 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question