?
Solved

SDI Main Form

Posted on 1997-04-23
2
Medium Priority
?
174 Views
Last Modified: 2010-04-04
I have an app which I am hoping will have a main form similar in appearance to Delphi (ie, a tool bar & menu bar across the top of the screen).  However, if the form is maximized it first enlarges the form to the size of the screen and then shrinks back to the size I set in onResize.

How do I make it stay at the same height even during maximization??  How do I limit the size of the form to X if it is resized using the sides of the window?

Its not a major problem, but it looks pretty dodgey.  Any help would be appreciated.
0
Comment
Question by:Stuart_Johnson
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 4

Accepted Solution

by:
erajoj earned 100 total points
ID: 1335646
You can do something like this...
     .
     .
     .
  private
    procedure LimitSize(var Info: TWMGetMinMaxInfo); message WM_GETMINMAXINFO;
  end;
     .
     .
     .
implementation

{$R *.DFM}

procedure TMainForm.LimitSize(var Info: TWMGetMinMaxInfo);
begin
  with Info.MinMaxInfo^.ptMaxTrackSize do begin
    {X := 640 or whatever you want;}
    Y := MyDefinedHeight {or something};
  end;
end;

That should do it!
0
 
LVL 6

Author Comment

by:Stuart_Johnson
ID: 1335647
MATE!!!!!  You are a genius!  Thanks a million!  I wasnt expecting a reply back so quickly - worked like a charm!

Just as a tip, can you make mention if a procedure/function/constant requires an external unit such as this one requiring MESSAGES.

Again, thanks mate....

Regards,


Stuart
0

Featured Post

New benefit for Premium Members - Upgrade now!

Ready to get started with anonymous questions today? It's easy! Learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…
Suggested Courses

801 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question