Rody, 你好, 按你说的改为以下代码, 编译正确, 但还是没反应, 麻烦你再指点指点.
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms,
StdCtrls, Db, DBTables, Grids, DBGrids,Dialogs;
Const
MyMsg_DataIsScroll=WM_USER+1;
type
TForm1 = class(TForm)
Button1: TButton;
DataSource1: TDataSource;
Table1: TTable;
DBGrid1: TDBGrid;
private
{ Private declarations }
procedure DataScroll(var message: tmessage)
message MyMsg_DataIsScroll;
public
{ Public declarations }
procedure invoim_adsAfterScroll(DataSet: TDataSet);
end;
//DataModal
var
Form1: TForm1;
implementation
{$R *.DFM}
procedure tform1.invoim_adsAfterScroll(DataSet: TDataSet);
begin
if form1=nil then exit;
postmessage(form1.Handle,MyMsg_DataIsScroll,0,0);
end;
procedure tform1.DataScroll(var message: tmessage);
begin
//your refresh code;
showmessage('fasdsdfsd');
end;