计算机二级移除DBGrid的垂直滚动条代码计算机二级考试
文章作者 100test 发表时间 2009:05:26 18:19:06
来源 100Test.Com百考试题网
2009年下半年全国计算机等级考试时间是2009年9月19日至23日。一般在考试前两个月开始报名!更多优质资料尽在百考试题论坛 百考试题在线题库
有时候在编程过程中由于实际需要,需要移除DBGrid的垂直滚动条,但是有很多的新手不知道这么做,下面我们给出移除DBGrid的垂直滚动条的源代码
<.P class=content style=""MARGIN: " 0px\? 2px 4px>.type
TNoVertScrollDBGrid = class(TDBGrid)
protected
procedure Paint. override.
end.
procedure Register.
implementation
procedure TNoVertScrollDBGrid.Paint.
begin
SetScrollRange(Self.Handle, SB_VERT, 0, 0, False).
inherited Paint.
end.
procedure Register.
begin
RegisterComponents(\’Data Controls\’, [TNoVertScrollDBGrid]).
end.
end.
<.P class=content style=""MARGIN: " 0px\? 2px 4px>. 其实很简单的吧 呵呵,觉得好就收藏了哦,说不定下次又要用到的哦~
特别推荐:
2009年9月全国计算机等级考试时间及科目预告