AutoHotkey Community

It is currently May 27th, 2012, 12:29 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 16 posts ]  Go to page Previous  1, 2
Author Message
 Post subject:
PostPosted: November 23rd, 2009, 5:31 pm 
Offline

Joined: February 23rd, 2008, 6:52 pm
Posts: 30
SKAN wrote:
Try this:

Code:
; Credit: shimanov - www.autohotkey.com/forum/viewtopic.php?p=40066#40066
WinGetPos, GX,GY,GW,GH, ahk_class Shell_TrayWnd
VarSetCapacity( OWA,16,0 ), VarSetCapacity( NWA,16,0 )                   ; SPI_GETWORKAREA
DllCall( "SystemParametersInfo", UInt,0x30, UInt,0, UInt,&OWA, UInt,0 )
DllCall( "SystemParametersInfo", UInt,0x30, UInt,0, UInt,&NWA, UInt,0 )
MsgBox, % NumGet(NWA,0) "`n" NumGet(NWA,4) "`n" NumGet(NWA,8) "`n" NumGet(NWA,12)
NumPut( NumGet(OWA,12)-GH, NWA,12 )                                      ; SPI_SETWORKAREA
MsgBox, % NumGet(NWA,0) "`n" NumGet(NWA,4) "`n" NumGet(NWA,8) "`n" NumGet(NWA,12)
DllCall( "SystemParametersInfo", UIint,0x2F, UInt,0, UInt,&NWA, UInt,0 )

Gui -Caption +ToolWindow +AlwaysOnTop +Border
GY := GY-GH
Gui, Show, x%GX% y%GY% w%GW% h%GH%
OnExit, QuitScript
Return

QuitScript:
 DllCall( "SystemParametersInfo", UIint,0x2F, UInt,0, UInt,&OWA, UInt,0 )
 OnExit
 ExitApp
Return


This should be painfully obvious, but I can't see how to make this be an area of specified height docked at the top of the screen rather than the bottom.

The Gui location is easy enough to change, but I am unclear on the workarea. I would like to create an area of screenwidth and 150px tall that starts at the top left corner of the screen.


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 16 posts ]  Go to page Previous  1, 2

All times are UTC [ DST ]


Who is online

Users browsing this forum: chaosad, Exabot [Bot], Google Feedfetcher, jrav and 19 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group