Re: Window moving

From: Kurt Barthelmess (kbarthelmess_at_compuserve.com)
Date: 10/22/03


Date: Wed, 22 Oct 2003 17:02:57 GMT


"J. Clarke" <jclarke@docstorsysNOSPAM.com> wrote:

>Thats not so much of a problem as
>capturing when the other app is moved/repositioned (please note it is not an
>app I developed).

That is inded a whole other can of worms. But it shouldn't relate to
whether you "attach" to the left side or the right side of the other
app.

To return to the other problem, it is not sufficient to capture the
mouse or "trap mouse events". The window could move itself, be moved
by the keyboard, or be moved by another application or even Windows
itself (think "tiling" or "cascading" of the desktop.) It is possible
to "spy" on the other app and watch for WM_MOVE or related messages,
but installing message hooks is a huge burden on you and a lot of
overhead. Instead consider a KISS solution - add a timer to your form
that looks to see where the other app is every 500 msec. or so. If it
has moved, move yourself. Very little overhead, very little burden and
probably an indetectable delay as far as the user is concerned.

Good luck.

Kurt



Relevant Pages

  • Re: How do I intercept a close event?
    ... I think that the easiest way of capturing the close event of the form, ... > I'm at a loss with how to differentiate between the User closing the ... > app down and Windows closing the app down ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Determining error context
    ... add in the error context identification, ... Capturing the context did not seem particularly important until I started ... developing a non-interactive app. ... hard-code that into the call to your error logger. ...
    (microsoft.public.access.modulesdaovba)
  • Re: How do I intercept a close event?
    ... I tried what you suggested and its works fine for detecting when the User ... the App is closed via Shutdown. ... > I think that the easiest way of capturing the close event of the form, ... > Branimir Giurov ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: FileSystemWatcher WinXP versus Win2003
    ... still in used by the originator). ... my app picks it up. ... But i am capturing the Created and Changed events using: ... The copy does not work on the Win2003 but when i use notepad to save the ...
    (microsoft.public.dotnet.languages.csharp)
  • FileSystemWatcher WinXP versus Win2003
    ... my app picks it up. ... But i am capturing the Created and Changed events using: ... The copy does not work on the Win2003 but when i use notepad to save the ...
    (microsoft.public.dotnet.languages.csharp)