本文整理自网络,侵删。
捕捉 Windows WM_WINDOWPOSCHANGING信息和 WindowPos 结构的‘or’标记,它把预先定义了的常数SWP_NOMOVE 和 SWP_NOSIZE 作为信息的lparam参数。
type
TForm1 = class(TForm)
private
procedure WMPosChange(var Message: TWMWINDOWPOSCHANGING);
message WM_WINDOWPOSCHANGING;
public
end;
var
Form1: TForm1;
implementation
{$R *.DFM}
procedure Tform1.WMPosChange(var Message: TWMWINDOWPOSCHANGING);
begin
PWindowPos(TMessage(Message).lParam).Flags :=
PWindowPos(TMessage(Message).lParam).Flags or
SWP_NOMOVE or SWP_NOSIZE;
end;
相关阅读 >>
Delphi listboxadditems() 不重复添加edit1
Delphi 多次改变 richedit.text部份文本的颜色后,出现所有字体都变色的的解决办法
windows关机函数exitwindowsex使用大全(适用windows所有操作平台)
更多相关阅读请进入《Delphi》频道 >>