AutoHotkey Community

It is currently May 27th, 2012, 12:42 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 3 posts ] 
Author Message
PostPosted: December 21st, 2009, 3:28 am 
Offline

Joined: February 29th, 2008, 12:11 pm
Posts: 943
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?


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: December 21st, 2009, 6:57 am 
Offline

Joined: December 1st, 2006, 9:27 am
Posts: 460
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

_________________
Image


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: December 21st, 2009, 9:11 am 
Offline

Joined: February 29th, 2008, 12:11 pm
Posts: 943
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.


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: Bing [Bot], Leef_me, Ohnitiel, XstatyK, Yahoo [Bot] and 14 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