Board index » delphi » Understanding Form Movement

Understanding Form Movement


2004-10-12 11:39:11 PM
delphi100
How i can understand when form moving.
 
 

Re:Understanding Form Movement

"Bilal" <XXXX@XXXXX.COM>writes news:416bfa9f$XXXX@XXXXX.COM...
Quote

How i can understand when form moving.
You can't: maybe it is you who are moving, and the form is staying still.
 

Re:Understanding Form Movement

Bilal writes:
Quote
How i can understand when form moving.
I assume you want to know how to detect when a form is being moved. You
can probably use the Non-Client Windows Messages to do this. Here is an
example of how they are used. You will at least be able to tell when
the user clicks on the "non-client" area of the window and that will let
you know that the user is beginning to drag the Window. There may be a
better way that I am not aware of (I don't have Delphi handy at the moment).
www.delphicorner.f9.co.uk/articles/forms6.htm
 

Re:Understanding Form Movement

"Bilal" <XXXX@XXXXX.COM>writes
Quote

How i can understand when form moving.
Look at TScreen. At worst you ought to be able to poll
Screen.activeform.left and compare current value with previous.
Kirk Halgren
"Back in 2000 a Republican friend warned me that if I voted for Al{*word*151}and
he won, the stock market would tank, we'd lose millions of jobs, and our
military would be totally overstretched. You know what? I did vote for gore,
he did win, and I will be damned if all those things didn't come true!"
-- James Carville
 

Re:Understanding Form Movement

Kevin writes:
Quote
There may be a
better way that I am not aware of (I don't have Delphi handy at the moment).
Of course, I should add that there is a quick and dirty way of doing this:
* Drop a timer on the form.
* Add code in the timer event to check if the Top and Left values have
changed for the form.
This one's a bit {*word*193} because you're constantly running something when
your app should really be idle. And it won't tell you exactly when they
start moving the windows unless you set the timer interval really low.
Cheers,
Kevin.
 

Re:Understanding Form Movement

Quote

How i can understand when form moving.

Catch the WM_WINDOWPOSChanging message
Eddy POULLET
Brussels
Not the good ng :)
 

Re:Understanding Form Movement

Bilal writes:
Quote
How i can understand when form moving.
Apart from TObject's excellent suggestion <g>,
look up the WM_MOVING and WM_MOVE message in the Delphi Win32 help file.
Install a handler for these messages and see what happens.
--
Ingvar Nilsen
 

Re:Understanding Form Movement

TObject writes:
Quote
maybe it is you who are moving, and the form is staying still.
LOL!
--
Cheers,
David Clegg
dclegg_at_ebetonline_dot_com
Vote 1 cc.borland.com/codecentral/ccweb.exe/listing :-)
Now supports Google Groups searching with Dyna-extend(tm) technology!
QualityCentral. The best way to bug Borland about bugs.
qc.borland.com
"Heh Heh Heh! Lisa! Vampires are make believe, just like elves and
gremlins and eskimos." - Homer Simpson