在原来TDBGrid的基础上增加了鼠标滚轮的支持: unit DBGrid3D; interface uses Windows, Messages, SysUtils, Classes, Controls, Grids, DBGrids; type TDBGrid3D = class(TDBGrid) private { Private declarations } protected { Protected declarations } public { Public declarations } published function DoMouseWheel(Shift: TShiftState; WheelDelta: Integer; MousePos: TPoint): Boolean; override; { Published declarations } end; procedure Register; implementation function TDBGrid3D.DoMouseWheel(Shift: TShiftState; WheelDelta: Integer; MousePos: TPoint): Boolean; begin if WheelDelta 0 then DataSource.DataSet.Prior; end; procedure Register; begin RegisterComponents('Samples', [TDBGrid3D]); end; end.