Jump to content

GUI Screen location


 Share

Recommended Posts

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
Link to comment
Share on other sites

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
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...