Jump to content

How can I add a function without it being part of GUICreate?


Recommended Posts

Just add 3 lines and modify a 4th one :

...

Global $nIniXPos = Int(IniRead($sMyIniLocation, 'MAINWINPOS', 'XPOS', Int(@DesktopWidth/2.95)))
Global $nIniYPos = Int(IniRead($sMyIniLocation, 'MAINWINPOS', 'YPOS', Int(@DesktopHeight/3.95)))

Global $iWidth = 590, $iHeight = 515 ; <=== ADD
$nIniXPos = (($nIniXPos <> -32000) ? ($nIniXPos) : ((@DesktopWidth - $iWidth) / 2))   ; <=== ADD
$nIniYPos = (($nIniYPos <> -32000) ? ($nIniYPos) : ((@DesktopHeight - $iHeight) / 2)) ; <=== ADD

...

; GUICreate("Download Video", 590, 515, $nIniXPos, $nIniYPos, Default, $WS_EX_TOPMOST)
GUICreate("Download Video", $iWidth, $iHeight, $nIniXPos, $nIniYPos, Default, $WS_EX_TOPMOST) ; <=== MOD

If it saves it at -32000, -32000, then it will be restored in the middle of the screen, isn't it enough ?

In fact the question is : do you have a problem if coords are saved at -32000, -32000 and the GUI reopens in the middle of the screen ?

If it is a problem, then my 4 lines patch won't help

Edited by pixelsearch
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...