views:

282

answers:

2

I want to recreate the stickiness and snapping of windows, like it is implemented in Winamp.

The basic premise is, when you drag a window and it comes close to another one, it will snap to it and will stick. When you move it the two will move together.

I need it for a MDI application.

+3  A: 

You could read this article and try to adopt it for your program:

Sticky Windows - How to make your (top-level) forms to stick one to the other or to the screen

The class presented in the article inherits from System.Windows.Forms.NativeWindow, thus no inheritance is required in order to make your class "Stick-able".

splattne
My current implementation is using this library - we are running into lots of issues with the way it's implemented. We are looking for something else.
Tomer Pintel
+1  A: 

Check out this one:

http://www.codeproject.com/KB/cs/eugsnapformextender.aspx

uzbones
Nice, but still has a few bugs. Thanks.
Tomer Pintel