We help IT Professionals succeed at work.

TForm OnAfterResize Event

cvbn
cvbn asked
on
TForm OnAfterResize Event

I don't know how my application to recognate if TForm has been resized ?
Comment
Watch Question

Author

Commented:
To reconize when is mouse_event -> LeftUp, after LeftDown (OnResize TForm)

Commented:
TForm.OnResize event occurs immediately after the form is resized.

In TForm.OnCanResize you can either permit or forbid incoming resize operation.

Best regards, Ivo.

Author

Commented:
The problem is that I use OnResize event and I need something to finished it. Something what is after OnResize. I tried with appmessage :

if msg.message=WM_LBUTTONUP after
if msg.message=WM_LBUTTONDOWN

but I find that this operations are doing OnResize event never, or many times. I need just one event, wich is after OnResize.

Thanks.

Author

Commented:
Or how to chech if Mouse Left Button is UP.

Thanks.
Commented:
> Or how to chech if Mouse Left Button is UP.

if not (csLButtonDown in YourForm.ControlState) then ...


It would be nice if you can be more specific in your intentions...

Ivo

Author

Commented:
I use WinXP Profesional with Delphi 5 Enterprise.
When I press Form to resize
showmessage('Resize');
appears when is LButtonDown.

Thanks.

This is a code :

unit Unit1;

interface

uses
  Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
  ExtCtrls;

type
  TForm1 = class(TForm)
    Timer1: TTimer;
    procedure FormResize(Sender: TObject);
    procedure Timer1Timer(Sender: TObject);
  private
    { Private declarations }
    resizestr : string;
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

{$R *.DFM}

procedure TForm1.FormResize(Sender: TObject);
begin
resizestr:='Resize';
end;

procedure TForm1.Timer1Timer(Sender: TObject);
begin
if not (csLButtonDown in Form1.ControlState) then
if resizestr='Resize' then
begin
showmessage('Resize');
resizestr:='';
end;
end;

end.

Commented:
cvbn: I still don't understand what do you want achieve?