Ver Mensaje Individual
  #5  
Antiguo 09-03-2007
Avatar de poliburro
[poliburro] poliburro is offline
Miembro Premium
 
Registrado: ago 2004
Ubicación: México D.F
Posts: 3.068
Reputación: 25
poliburro Va por buen camino
Deberás crear un componente que lo haga: Aquí te mando el código:

Código Delphi [-]
 
 
unit NoScrollDBGrid;
interface
uses
  SysUtils, Classes, Controls, Grids, DBGrids, Messages, Windows;
type
  TNoScrollDBGrid = class(TDBGrid)
  private
    { Private declarations }
    procedure WMNCCalcSize(var Msg: TMessage);
      message WM_NCCALCSIZE;
  protected
    { Protected declarations }
  public
    { Public declarations }
  published
    { Published declarations }
  end;
procedure Register;
implementation
procedure TNoScrollDBGrid.WMNCCalcSize(var Msg: TMessage);
const
  Scrollstyles = WS_VSCROLL;
var
  Style: Integer;
begin
  Style := GetWindowLong(Handle, GWL_STYLE);
  if (Style and Scrollstyles) <> 0 then
    SetWindowLong(Handle, GWL_STYLE, Style and not Scrollstyles);
  inherited;
end;
procedure Register;
begin
  RegisterComponents('Especiales', [TNoScrollDBGrid]);
end;
end.
__________________
Conoce mi blog http://www.edgartec.com
Responder Con Cita