廣告

2024 年 3 月
 123
45678910
11121314151617
18192021222324
25262728293031

彙整

[Delphi]讓Windows捲軸捲動時,資料內容同時跟著平滑捲動。

讓Windows捲軸捲動時,資料內容同時跟著平滑捲動。

出處:

http://delphi.ktop.com.tw/board.php?cid=168&fid=918&tid=100386

http://delphi.ktop.com.tw/board.php?cid=30&fid=66&tid=70761

   TDBGrid = Class(DBGrids.TDBGrid)
    Protected
    procedure WMVScroll(var Message: TWMVScroll); message WM_VSCROLL;
    end;
    TForm1 = class(TForm)
    ….

procedure TDBGrid.WMVScroll(var Message: TWMVScroll);
begin
    if Message.ScrollCode = SB_THUMBTRACK then Message.ScrollCode := SB_THUMBPOSITION;
    inherited;
end;

讀者也會看的其它文章:

    Comments are closed.