Articles   Members Online: 3
-Article/Tip Search
-News Group Search over 21 Million news group articles.
-Delphi/Pascal
-CBuilder/C++
-C#Builder/C#
-JBuilder/Java
-Kylix
Member Area
-Home
-Account Center
-Top 10 NEW!!
-Submit Article/Tip
-Forums Upgraded!!
-My Articles
-Edit Information
-Login/Logout
-Become a Member
-Why sign up!
-Newsletter
-Chat Online!
-Indexes NEW!!
Employment
-Build your resume
-Find a job
-Post a job
-Resume Search
Contacts
-Contacts
-Feedbacks
-Link to us
-Privacy/Disclaimer
Embarcadero
Visit Embarcadero
Embarcadero Community
JEDI
Links
How to set minimum / maximum values for a resizable form Turn on/off line numbers in source code. Switch to Orginial background IDE or DSP color Comment or reply to this aritlce/tip for discussion. Bookmark this article to my favorite article(s). Print this article
23-Aug-02
Category
VCL-Forms
Language
Delphi All Versions
Views
65
User Rating
No Votes
# Votes
0
Replies
0
Publisher:
DSP, Administrator
Reference URL:
DKB
			Author: Tomas Rutkauskas

Set minimum/maximum values for a resizable form

Answer:

There is a windows message that requests the minimum and the maximum value for a
resizable window ('form').
The following code makes sure that a window of type TForm1 is not smaller than
100x100 and not larger than 200x200 pixels:

1   type
2     TForm1 = class(TForm)
3     protected
4       procedure WMGetMinMaxInfo(var message: TWMGetMinMaxInfo);
5         message WM_GETMINMAXINFO;
6     end;
7   
8   procedure TForm1.WMGetMinMaxInfo(var message: TWMGetMinMaxInfo);
9   begin
10    with message.MinMaxInfo^ do
11    begin
12      ptMinTrackSize := Point(100, 100);
13      ptMaxTrackSize := Point(200, 200);
14    end;
15  end;


			
Vote: How useful do you find this Article/Tip?
Bad Excellent
1 2 3 4 5 6 7 8 9 10

 

Advertisement
Share this page
Advertisement
Download from Google

Copyright © Mendozi Enterprises LLC