我也没有什么好办法,就是重载Windows消息了,程序如下:
type
TForm1 = class(TForm)
private
{ Private declarations }
procedure MYOnMove(var Message:TMessage); Message WM_WINDOWPOSCHANGING;
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.MYOnMove(var Message:TMessage);
type
PWINDOWPOS=^tagWINDOWPOS;
begin
PWINDOWPOS(Message.LParam)^.x:=Left;
PWINDOWPOS(Message.LParam)^.y:=Top;
inherited;
end;
如合意,帮小弟看一下:
http://www.delphibbs.com/delphibbs/dispq.asp?lid=1083246