Sign in to follow this  
Followers 0
weemandan

GUI Screen location

2 posts in this topic

#1 ·  Posted (edited)

Hi,

I'm new to this (very, a friend of mine's taught it me today) but I want to know if there's a way to set a GUI a specific location on the screen, ideally I'd like the little program I've been working on to always open in the bottom left of the screen regardless of resolution, is there a way to do this?

Thanks,

Dan

Edited by weemandan

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

When you create a GUI you can specifiy the x and y locations, which I believe would be the top left of the window. Here's an example.

#include <GUIConstants.au3>

$x = @DesktopWidth
$y = @DesktopHeight
$gui = GUICreate("Test GUI",200,200,$x * .0125,$y * .95)

GUISetState()

While 1
    $msg = GUIGetMsg()
    
    If $msg = $GUI_EVENT_CLOSE Then Exit
WEnd
Edited by spudw2k

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0