Solved

About form Resizing

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
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…
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…

910 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now