应该在onReSize里就可以控制吧;
解决方案 »
- 失意中~不知道该怎么办!大家给点意见吧~
- 急急急!!如何在fastreport中预览显示出数据库中的jpg图片字段?????????????????
- 请问如何给dataModule中的adoConnection赋值?
- 文本文件转换为2个数据库的问题(在线等)?
- 程序中的两个uses有什么区别的亚?
- 关于rectangle....
- 请问各位高手,delphi6中的DBCtrlGrid控件是否可以多选?如果想在数据集中多选的话如何写代码?
- 用数据库实现查找功能出错,谁帮我看看(用的是adoquery控件)
- 为什么我用tblobfield(afield).savetofile('file.exe')总出错。
- SQL Server安装问题
- 什么是TNotifyEvent和TIndexEvent?
- 怎样在delphi中屏蔽热启动键(ctrl+alt+del)???特向高手请教???
我好像找不到form有maxheight这个属性啊。
当它极大时只占屏幕的一小部分,它是如何实现的呢,请看下面的说明:
1)在FORM私有声明部分加上如下一行:
procedure WMGetMinMaxInfo( var Message:TWMGetMinMaxInfo ); message WM_GETMINMAXINFO;
2)在声明部分加上如下几行:
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;
/////////////////////////////////////////////
unit getminmax;interfaceuses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs;type
TForm1 = class(TForm)
private
{ Private declarations }
procedure WMGetMinMaxInfo(var Msg: TWMGetMinMaxInfo);
message WM_GETMINMAXINFO;
procedure WMInitMenuPopup(var Msg: TWMInitMenuPopup);
message WM_INITMENUPOPUP;
procedure WMNCHitTest(var Msg: TWMNCHitTest); message WM_NCHitTest;
public
{ Public declarations }
end;var
Form1: TForm1;implementation{$R *.DFM} procedure TForm1.WMGetMinMaxInfo(var Msg: TWMGetMinMaxInfo);
begin
inherited;
with Msg.MinMaxInfo^ do
begin
ptMinTrackSize.x:= form1.width;
ptMaxTrackSize.x:= form1.width;
ptMinTrackSize.y:= form1.height;
ptMaxTrackSize.y:= form1.height;
end;
end; procedure TForm1.WMInitMenuPopup(var Msg: TWMInitMenuPopup); begin
inherited;
if Msg.SystemMenu then
EnableMenuItem(Msg.MenuPopup, SC_SIZE, MF_BYCOMMAND or MF_GRAYED)
end; procedure TForm1.WMNCHitTest(var Msg: TWMNCHitTest);
begin
inherited;
with Msg do
if Result in [HTLEFT, HTRIGHT, HTBOTTOM, HTBOTTOMRIGHT,
HTBOTTOMLEFT, HTTOP, HTTOPRIGHT, HTTOPLEFT] then
Result:= HTNOWHERE
end;
end. { End of Unit}
未经证实葵花宝典里的内容,应该可以满足你的需求吧。
Constraints.MaxWidth
Constraints.MinHeight
Constraints.MinWidth