Jump to content

Recommended Posts

Posted

I have a GUI window that by defualt (per the code samples) displays in the middle of the screen each time.

I'd like to give the user the ability to move the dialog so that subsequent calls of the dialog will position it in the last position (the position it was in when the GUI was closed).

What do I need to call in order to get the TOP and LEFT position of a GUI window?

TIA

Sean Shrum :: http://www.shrum.net

All my published AU3-based apps and utilities

'Make it idiot-proof, and someone will make a better idiot'

 

Posted

just a note... to place the GUI in the middle of the screen

; Center Window on Screen
; Author cdkid and Valuater

Func _Middle($win, $txt)
    $size = WinGetClientSize($win, $txt)
    Local $y = (@DesktopHeight / 2) - ($size[1] / 2)
    Local $x = (@DesktopWidth / 2) - ($size[0] / 2)
    Return WinMove($win, $txt, $x, $y)
EndFunc ;==>_Middle

8)

NEWHeader1.png

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
×
×
  • Create New...