Creating an app that docks to a side in WINDOWS

Administrator

VB.NET Forum Admin
Joined
Jun 3, 2004
Messages
1,461
Programming Experience
10+
Anyone have any experience creating an application that actually docks to an edge in the Windows Shell/Desktop? Curious how to go about this.
 

TPM

Well-known member
Joined
Dec 7, 2004
Messages
623
Location
CA
Programming Experience
3-5
I belive you'd use system.windows.forms.screen - working area, to set your forms location.

TPM
 

JuggaloBrotha

VB.NET Forum Moderator
Staff member
Joined
Jun 3, 2004
Messages
4,524
Location
Lansing, MI; USA
Programming Experience
10+
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
 

Paszt

Staff member
Joined
Jun 3, 2004
Messages
1,500
Location
Raleigh, NC - USA
Programming Experience
Beginner
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.
 

JuggaloBrotha

VB.NET Forum Moderator
Staff member
Joined
Jun 3, 2004
Messages
4,524
Location
Lansing, MI; USA
Programming Experience
10+
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) ?
 
Top Bottom