attaching a form to the edge of a separate application window?

W

wavedave

Hello everyone -

I'm trying to build a .NET application (C#) in which my program acts as
an add-on to another existing application, providing some additional
functionality. The way I want the UI to behave is such that my
application's window will dock itself to the right-hand edge of the
other app's main window (after resizing that app slightly, to make
space), and then will follow the other app when it is
moved/resized/minimized/maximized/etc..

Is there a standard way to do this with .NET? The easiest of all would
be if .NET/win32 had a function that I could call which would tell my
app to continually keep itself positioned on-screen *relative to this
other application*. (maybe that would be too good to be true - you can
tell me if that's the case :))

Another (related) question about this - there is mouse and keyboard
interaction that happens on both application windows, and I'm hoping
that I can implement a "focus follows mouse" behavior so that when the
user goes back to the main application window, they don't have to click
once to focus, then again to begin actually interaction. Is there a
good way to do this?

thanks very much,
-David Merrill
p.s. this message also posted to:
microsoft.public.dotnet.framework.windowsforms
microsoft.public.dotnet.csharp.general
 
V

vj

David...

This depends on how much you know about the "other" app. If you just know at
the process level, then I am not sure of the details.. Probably you can
google IPC i.e interprocess communication to see how to do it...

If you know the source code of the "other" application, there are definitely
you can do it through some common file that is going to give you how to
re-position the current window...

hope you get the idea...
VJ
 
W

wavedave

Hi VJ -
Yeah, I basically only know it at the process level. I can query it via
a COM interface for its location and size, minimized/maximized/etc, but
I don't think I can ask it to notify my app whenever any of these
change. Is there a way to ask Windows to notify my application whenever
there is a change to any of these parameters?
thanks,
-David
 
V

vj

I don't know much about IPC... u can try goggling... or lookup at
codeproject.com. You might find samples...

Vijay
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top