Solved

About form Resizing

Posted on 1998-11-03
3
183 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

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

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…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …

813 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

15 Experts available now in Live!

Get 1:1 Help Now