Jump to content
Sign in to follow this  

How to use GUICoordmode?

Recommended Posts


So how do you use Coordmode with GUI creation?

I was wondering if I could used it like this; Control 1 gets placed in x10,y15 and Control 2 would be placed in Control 1s x + 10 and Control 1s y + 15?

E.g. it would use the previous control xy for the next control, so you can keep "building" upon.

Or have I miss understand the coordmode? Sorry, English aren't my native language. Possible to provide an example?

Share this post

Link to post
Share on other sites


#include <GUIConstantsEx.au3>

$hGUI = GUICreate("Coord Mode Test", 300, 200)

GUISetCoord(10, 10) ;sets X, Y coordinates

GUICtrlCreateLabel("Label", -1, -1, 100, 16)

GUICtrlCreateButton("Test", -1 + 20, -1 + 30, 75, 23)

GUICtrlCreateInput("Test", -1 + 40, -1 + 60, 100, 23)


While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
  • Like 1

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