AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

keeping GUI window at the lower right corner of the screen

 
Reply to topic    AutoHotkey Community Forum Index -> Ask for Help
View previous topic :: View next topic  
Author Message
Benny-D



Joined: 29 Feb 2008
Posts: 865

PostPosted: Mon Dec 21, 2009 2:28 am    Post subject: keeping GUI window at the lower right corner of the screen Reply with quote

How can I keep my GUI window at the lower right corner (so that its lower right corner is the lower right corner of the screen) when its size is not specified (susceptible to changes depending on its contents) and the number of controls in the window is always changing?
Back to top
View user's profile Send private message
Micahs



Joined: 01 Dec 2006
Posts: 460

PostPosted: Mon Dec 21, 2009 5:57 am    Post subject: Reply with quote

Try this. It will keep the gui at the bottom-right during gui size changes.

Code:
Gui, Add, Text,, This should stay at the`nbottom-right of the screen.
Gui, Show, w200 h100

incW=200
incH=100
Loop, 25
{   Sleep, 150
   incW += 10
   incH += 5
   Gui, Show, w%incW% h%incH% NA
}
Return

GuiClose:
   ExitApp
Return

GuiSize:
   Gui, %A_Gui%:+LastFound
   WinGetPos, x, y, w, h
   x1 := A_ScreenWidth - w
   y1 := A_ScreenHeight - h
   WinMove, x1, y1
Return

_________________
Back to top
View user's profile Send private message
Benny-D



Joined: 29 Feb 2008
Posts: 865

PostPosted: Mon Dec 21, 2009 8:11 am    Post subject: Reply with quote

WOW, Micahs, thanks a lot. Exactly what I want!!!

While I am thankful to you for this code, I am quite surprised that AHK GUI doesn't have a special feature for this in GUI options.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    AutoHotkey Community Forum Index -> Ask for Help All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group