5207兄,你说的代码在哪里? ( 积分: 10 )

  • 主题发起人 主题发起人 ff_ff
  • 开始时间 开始时间
F

ff_ff

Unregistered / Unconfirmed
GUEST, unregistred user!
property OnPaint: TNotifyEvent read FOnPaint write FOnPaint stored IsForm;
FOnPaint: TNotifyEvent;
procedure Paint
dynamic;
procedure TCustomForm.Paint;
begin
if Assigned(FOnPaint) then FOnPaint(Self);
end;
TNotifyEvent = procedure(Sender: TObject) of object;
procedure WMPaint(var Message: TWMPaint)
message WM_PAINT;
procedure TForm1.FormPaint(Sender: TObject);
begin
ShowMessage('重画');
end;
我把事件onpaint相关的VCL代码全帖出来,以此为例:
当用户改变窗口大小时,弹出'重画'对话框,可是:
FormPaint(Sender:TObject)如何知道响应OnPaint事件
 
property OnPaint: TNotifyEvent read FOnPaint write FOnPaint stored IsForm;
FOnPaint: TNotifyEvent;
procedure Paint
dynamic;
procedure TCustomForm.Paint;
begin
if Assigned(FOnPaint) then FOnPaint(Self);
end;
TNotifyEvent = procedure(Sender: TObject) of object;
procedure WMPaint(var Message: TWMPaint)
message WM_PAINT;
procedure TForm1.FormPaint(Sender: TObject);
begin
ShowMessage('重画');
end;
我把事件onpaint相关的VCL代码全帖出来,以此为例:
当用户改变窗口大小时,弹出'重画'对话框,可是:
FormPaint(Sender:TObject)如何知道响应OnPaint事件
 
OnPoint := FormPaint
是不是指这个?
 
哪里的这个代码
 
接受答案了.
 
我觉得你用FormResize吧。这个方法就是在改变窗口时触发的!
 
后退
顶部