本文整理自网络,侵删。
捕捉 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 xe system.netencoding 字符串base64编码解码
Delphi idhttp returning http 1.1/500 显示错误内容
Delphi sendtextmessage 等方便的消息发送函数
更多相关阅读请进入《Delphi》频道 >>