?
Solved

About form Resizing

Posted on 1998-11-03
3
Medium Priority
?
189 Views
Last Modified: 2010-04-06
how I to handle Form's OnResize event?Tankyou very much!
0
Comment
Question by:havensjg
[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
3 Comments
 
LVL 5

Expert Comment

by:scrapdog
ID: 1345530
What do you want to happen when the form is resized?
0
 
LVL 1

Accepted Solution

by:
Oli2 earned 150 total points
ID: 1345531
if you want to react on a user resizing your form, here's some help:

type
  TForm1 = class (TForm)
private
 procedure WMPosChange(var Message: TWMWINDOWPOSCHANGING);
 Message WM_WINDOWPOSCHANGING;
end;


procedure TForm1.WMPosChanging(var Message: TWMWINDOWPOSCHANGING);
begin
     //do something
end;

if you don't want the user to change the size of your form, insert the following into the
//do something part:

PWindowPos(TMessage(Message).lParam).Flags :=
PWindowPos(TMessage(Message).lParam).Flags or SWP_NOMOVE
0
 
LVL 1

Expert Comment

by:Oli2
ID: 1345532
correction : SWP_NOMOVE is for "not moving the Form"
SWP_NOSIZE is for "not sizing the Form"
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

Question has a verified solution.

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

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Suggested Courses
Course of the Month14 days, 1 hour left to enroll

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