Solved

About form Resizing

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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

758 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

27 Experts available now in Live!

Get 1:1 Help Now