Creating an app that docks to a side in WINDOWS


VB.NET Forum Admin
Jun 3, 2004
Programming Experience
Anyone have any experience creating an application that actually docks to an edge in the Windows Shell/Desktop? Curious how to go about this.
I belive you'd use - working area, to set your forms location.

the form's top and left location (properties window and in code) are the screen location, so you can get the screen location of the right with the left+width and bottom with the top+height of the form

the thing is that you'd have to keep track of the base form location, the dockable form's location, which direction it's moveing, and which edge to edge are touching

ie if the dackable form is moveing away from the base you dont want it to re-dock @ 10pixels (or what distance you want it to, winamp docks @ 10pixels) but you do want it to dock when moveing towards the base form.

I was thinking about doing something like this about 3 months ago, but my problem is that in vb when the frmDocking.Location event fires that's where you do all the checking for the docking, but when you have it dock, i dont know how to force a mouse button release
Because then if you maximize a seperate app, some of the window will be under your "docked" app. If you use APIs to tell the Operating System that your app is a toolbar (or AppBar) then when a seperate app is maximized, it will know where to maximize and not appear underneath the docked app. The operating system changes the available desktop area.
ok, say i have 2 forms now i want form 2 to dock next to form 1, i got it to do that but if they dont let go of the mouse button the form springs back to the cursor when the cursor moves a pixel, how do i force the button to be released (even though they're still physically still have the mouse button pressed) ?

Latest posts