| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
共有 1502 人关注过本帖
标题:限制窗体最大化时的大小
只看楼主 加入收藏
yangguofa
Rank: 1
等 级:新手上路
帖 子:197
专家分:0
注 册:2004-5-5
收藏
 问题点数:0 回复次数:1 
限制窗体最大化时的大小

private //添加窗体私有声明;

{ Private declarations }

procedure WMGetMinMaxInfo(var Message: TWMGetMinMaxInfo); message WM_GETMINMAXINFO;

procedure TForm1.WMGetMinMaxInfo(var Message: TWMGetMinMaxInfo);

begin

with Message.MinMaxInfo^ do

begin

ptMaxSize.X := 200; {最大化时宽度}

ptMaxSize.Y := 200; {最大化时高度}

ptMaxPosition.X := 99; {最大化时左上角横坐标}

ptMaxPosition.Y := 99; {最大化时左上角纵坐标}

end;

Message.Result := 0; {告诉Windows你改变了 minmaxinfo}

inherited;

end;


/bbs/UploadFile/2005-3/2005320191459674.gif" border="0" onload="if(this.width>screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" onmouseover="if(this.width>screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.style.cursor='hand'; this.alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" onclick="if(!this.resized) {return true;} else {window.open('http://www./bbs/UploadFile/2005-3/2005320191459674.gif');}" onmousewheel="return imgzoom(this);" alt="" />
2004-05-19 10:42
hanpengshan_00
Rank: 1
等 级:新手上路
帖 子:23
专家分:0
注 册:2004-7-16
收藏
得分:0 
利用contrains属性更快

2004-07-27 13:11
快速回复:限制窗体最大化时的大小
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.037305 second(s), 9 queries.
Copyright©2004-2025, BC-CN.NET, All Rights Reserved