Solved

Stupid DBGRID

Posted on 2003-11-10
2
281 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
Comment Utility
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
Comment Utility
Thx, mate! Exactly what i needed!
0

Featured Post

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

744 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now