{Remove vertical scroll bar}
SetWindowLong(DBGrid1.Handle, GWL_STYLE, GetWindowLong(DBGrid1.Handle,
GWL_STYLE) and not WS_HSCROLL{WS_VSCROLL});
{Force refresh of client and non-client areas}
SetWindowPos(DBGrid1.Handle, 0, 0, 0, 0, 0, SWP_NOZORDER or SWP_NOSIZE or
SWP_NOMOVE or SWP_FRAMECHANGED);
procedure Tform1.DBGrid1DrawColumnCell(Sender: TObject;
const Rect: TRect; DataCol: Integer; Column: TColumn;
State: TGridDrawState);
begin
{Remove vertical scroll bar}
SetWindowLong(DBGrid1.Handle, GWL_STYLE, GetWindowLong(DBGrid1.Handle,
GWL_STYLE) and not WS_HSCROLL{WS_VSCROLL});
{Force refresh of client and non-client areas}
SetWindowPos(DBGrid1.Handle, 0, 0, 0, 0, 0, SWP_NOZORDER or SWP_NOSIZE or
SWP_NOMOVE or SWP_FRAMECHANGED);
end;