ATTENTION: You are viewing a page formatted for mobile devices; to view the full web page, click HERE.

DonationCoder.com Software > Post New Requests Here

IDEA: Make any Window Dockable to the Side of the Screen

(1/3) > >>

greasypigstudios:
I've been looking for the longest time for an app that gave any window the ability to dock to the side of the screen like the Google/Vista sidebars, and the various instant messaging clients. I've got a 24 in widescreen that I want to maximize the visual efficiency of, and I prefer to work in a maximized window environment. I'm already using a vertical taskbar, docked IM buddy list, and vertical tab bar for firefox. I'm also already using Allsnap as a tiny step in the right direction (I used to use Gridmove but it was too sluggish). Being able to make my browser dockable would make it easy to put a spreadsheet up tiled next to it.

Anybody who can whip this up or even just point me in the direction of an existing app will get a featured article on my blog, http://www.greasypc.blogspot.com . It's not much of a reward but it's the best I can offer.

mouser:
i was going to suggest Allsnap.. what doesnt that do that you want to do?

greasypigstudios:
I want to be able to maximize my windows, and have windows i maximize not overlap the windows I've got docked. Instant messaging windows do this perfectly, I'm so surprised to find a utility doesn't exist for this already.

mouser:
ah yes i understand now.  i don't know any program for this off hand, but i look forward to seeing if anyone else knows any.

one thing you could do as a temporary stop gap is run a program like my DesktopCoral program and use it to reserve a side of your screen, and then manually size and move your other programs on top of that area.  they will then be protected from other programs maximizing on top of them.

skrommel:
 :) Here's DockOc!

Dock as many windows as you like to the screen's edges!
Usage: Grab a window by the caption and drop it on a screen edge to dock it.

There's still some options I want to add, but give it a try.

Skrommel



--- ---;DockOc.ahk
; Dock as many windows as you like to the screen's edges
; Usage: Grab a window by the caption and drop it on a screen edge
;Skrommel @ 2008

#NoEnv
#SingleInstance,Force
DetectHiddenWindows,On
SetWinDelay,0
CoordMode,Mouse,Screen

applicationname=DockOc

Gosub,MENU
showing=0
SetTimer,CHECK,500
OnExit,EXIT
Return


~LButton Up::
MouseGetPos,mx,my,mwin,mctrl
If (mx=monitorLeft)
  edge=left
Else
If (mx=monitorRight-1)
  edge=right
Else
If (my=monitorTop)
  edge=top
Else
If (my=monitorBottom-1)
  edge=bottom
Else
  Return
MouseGetPos,mx,my,mwin
SendMessage,0x84,,(my<<16)|mx,,ahk_id %mwin%
part:=ErrorLevel
If part<>2
  Return

WinGetPos,wx,wy,ww,wh,ahk_id %mwin%
If (edge="left")
  WinMove,ahk_id %mwin%,,0,
Else
If (edge="right")
  WinMove,ahk_id %mwin%,,% A_ScreenWidth-ww,
Else
If (edge="top")
  WinMove,ahk_id %mwin%,,,0
Else
If (edge="bottom")
  WinMove,ahk_id %mwin%,,,% A_ScreenHeight-wh
WinSet,AlwaysOntop,On,ahk_id %mwin%
WinHide,ahk_id %mwin%
%edge%=% "" %edge% . mwin ","
showing=0
Return


CHECK:
SysGet,monitor,MonitorWorkArea
MouseGetPos,mx,my,mwin,mctrl
edge=
If (mx=0)
  edge=left
Else
If (mx=A_ScreenWidth-1)
  edge=right
Else
If (my=0)
  edge=top
Else
If (my=A_ScreenHeight-1)
  edge=bottom

If (edge="left" Or edge="right")
  orientation=y
Else
If (edge="top" Or edge="bottom")
  orientation=x
Else
{
  If (mwin<>showingid)
  {
    WinHide,ahk_id %showingid%
    showing=0
  }
  Return
}

closestid=
shortest=9999
Loop,Parse,%edge%,`,
{
  id:=A_LoopField
  If id=
    Break
  IfWinNotExist,ahk_id %id%
    StringReplace,%edge%,%edge%,%id%`,,
  WinGetPos,wx,wy,ww,wh,ahk_id %id%
  distance:=Abs(m%orientation%-w%orientation%)
  If (distance<shortest) ; And my-wy>0 And my-wy<wh)
  {
    shortest:=distance
    closestid:=id
  }
}
If closestid=
  Return
If (showingid<>closestid)
  WinHide,ahk_id %showingid%
showingid:=closestid
WinShow,ahk_id %showingid%
showing=1
Return


EXIT:
edges=left,right,top,bottom
Loop,Parse,edges,`,
{
  edge:=A_LoopField
  Loop,Parse,%edge%,`,
  {
    id:=A_LoopField
    WinSet,AlwaysOntop,Off,ahk_id %id%
    WinShow,ahk_id %id%
  }
}
ExitApp


MENU:
Menu,Tray,DeleteAll
Menu,Tray,NoStandard
Menu,Tray,Add,%applicationname%,ABOUT
Menu,Tray,Add,
Menu,Tray,Add,&About...,ABOUT
Menu,Tray,Add,E&xit,EXIT
Menu,Tray,Tip,%applicationname%
Menu,Tray,Default,%applicationname%
Return


ABOUT:
Gui,Destroy
Gui,Margin,20,20
Gui,Add,Picture,xm Icon1,%applicationname%.exe
Gui,Font,W700
Gui,Add,Text,x+10 yp+10 Bold,%applicationname% v1.0
Gui,Font,W400
Gui,Add,Text,y+10,Dock as many windows as you like to the screen's edges
Gui,Add,Text,xp y+5,Usage: Grab a window by the caption and drop it on a screen edge

Gui,Add,Picture,xm y+20 G1HOURSOFTWARE Icon2,%applicationname%.exe
Gui,Add,Text,x+10 yp,For more tools, information and donations, please visit
Gui,Font,W700 CBlue
Gui,Add,Text,y+5 G1HOURSOFTWARE,www.1HourSoftware.com
Gui,Font,W400 CBlack

Gui,Add,Picture,xm y+20 GDONATIONCODER Icon7,%applicationname%.exe
Gui,Add,Text,x+10 yp,Please support the contributors at
Gui,Font,W700 CBlue
Gui,Add,Text,y+5 GDONATIONCODER,www.DonationCoder.com
Gui,Font,W400 CBlack

Gui,Add,Picture,xm y+20 GAUTOHOTKEY Icon6,%applicationname%.exe
Gui,Add,Text,x+10 yp,This tool was made using the powerful
Gui,Font,W700 CBlue
Gui,Add,Text,y+5 GAUTOHOTKEY,www.AutoHotkey.com
Gui,Font,W400 CBlack

Gui,Show,,%applicationname% - About
Gui,+LastFound
guiid:=WinExist()
hCurs:=DllCall("LoadCursor","UInt",NULL,"Int",32649,"UInt") ;IDC_HAND
OnMessage(0x200,"WM_MOUSEMOVE")
Return

1HOURSOFTWARE:
Run,www.1HourSoftware.com
Return

DONATIONCODER:
Run,www.DonationCoder.com
Return

AUTOHOTKEY:
Run,www.AutoHotkey.com
Return

WM_MOUSEMOVE(wParam,lParam)
{
  Global hCurs
  Global guiid
  MouseGetPos,,,mwin,mctrl
  If mwin in %guiid%
  If mctrl in Static7,Static10,Static13
    DllCall("SetCursor","UInt",hCurs)
  Return
}

GuiEscape:
GuiClose:
  Gui,Destroy
  OnMessage(0x200,"")
  DllCall("DestroyCursor","Uint",hCurs)
Return

Navigation

[0] Message Index

[#] Next page

Go to full version