D
deepfar
Unregistered / Unconfirmed
GUEST, unregistred user!
请高手们帮忙,类代码如下:
unit UWindowMoving;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, ExtCtrls;
type
TWindowMoving = class(TComponent)
private
FMainForm: TForm;
public
procedure WindowMoving(var Msg: TMessage); message WM_MOVING;
constructor Create(AMainForm: TForm);
destructor Destroy; override;
end;
implementation
constructor TWindowMoving.Create(AMainForm: TForm);
begin
inherited Create(AMainForm);
FMainForm := AMainForm;
end;
destructor TWindowMoving.destroy;
begin
inherited destroy;
end;
procedure TWindowMoving.WindowMoving(var Msg: TMessage);
begin
inherited;
showmessage('Moving Window!');
end;
end.
unit UWindowMoving;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, ExtCtrls;
type
TWindowMoving = class(TComponent)
private
FMainForm: TForm;
public
procedure WindowMoving(var Msg: TMessage); message WM_MOVING;
constructor Create(AMainForm: TForm);
destructor Destroy; override;
end;
implementation
constructor TWindowMoving.Create(AMainForm: TForm);
begin
inherited Create(AMainForm);
FMainForm := AMainForm;
end;
destructor TWindowMoving.destroy;
begin
inherited destroy;
end;
procedure TWindowMoving.WindowMoving(var Msg: TMessage);
begin
inherited;
showmessage('Moving Window!');
end;
end.