Article View: cn.bbs.comp.program
Article #1170How to set a max and min form size
From: �ϵ�
Date: Sun, 19 Apr 1998 00:00
Date: Sun, 19 Apr 1998 00:00
72 lines
2148 bytes
2148 bytes
������: njhe (heҪ�Ʋ�), ����: RAD
�� ��: How to set a max and min form size
����վ: '3m�Ͻ�ɺ�m' (Mon Mar 9 18:03:15 1998) , վ���ż�
Product: Delphi
Version: All
Platform: Windows/Win32
When you want to control how much your users can resize your
form, you can control that by setting the MinMax values. (If
you use the resize method to limit the size, it will work, but
it won't look quite as good.)
Note: To make it so that the user cannot change the form's
size at all, make the min and max sizes the same values.
This is an example of how to declare and use the wm_GetMinMaxInfo
windows message in your applications.
unit MinMax;
interface
uses
SysUtils, WinTypes, WinProcs, Messages, Classes, Graphics, Controls,
Forms, Dialogs;
type
TForm1 = class(TForm)
private
{ Private declarations }
procedure WMGetMinMaxInfo(var MSG: Tmessage); message WM_GetMinMaxInfo;
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.DFM}
procedure TForm1.WMGetMinMaxInfo(var MSG: Tmessage);
Begin
inherited;
with PMinMaxInfo(MSG.lparam)^ do
begin
with ptMinTrackSize do
begin
X := 300;
Y := 150;
end;
with ptMaxTrackSize do
begin
X := 350;
Y := 250;
end;
end;
end
end.
--
��ϧһ�д�ۣ��ﵽ���������塣
��������߱����������߱��
m;31m�� ��Դ:���Ͻ�ɺ� bbs.njupt.edu.cn��[FROM: 202.119.236.104]m
--
[m[1;37m�� ��Դ:���ϴ�С�ٺ���Ϣ����վ bbs.nju.edu.cn��[FROM: a507yjh.nju.edu][m
Technical Details
Message-ID:
<3OAbRP$tPC@bbs.nju.edu.cn>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII X-Google-Thread: fc86e,67bd4489365470fb,start X-Google-Attributes: gidfc86e,public From: mendy.bbs@bbs.nju.edu.cn (�ϵ�) Subject: How to set a max and min form size Date: 1998/04/19 Message-ID: <3OAbRP$tPC@bbs.nju.edu.cn> X-Deja-AN: 345866729 X-Filename: Programming/M.893006377.A Organization: nju_bbs Newsgroups: cn.bbs.comp.program