Jump to content
Sign in to follow this  
Champak

All GUI positioning the same

Recommended Posts

Champak

I'm surprised there isn't a simple and clear defined way of doing this, and even built into the guicreate function as a default or option....unless I'm totally missing it.

I want that when I "open"/show the new gui and hide the old one, the new one shows in the exact place of the old one. As I have it, if I open the GUI on the left of the screen and move it to the right, and then click the button to SWITCH the GUIs(NOT reopen it), the new GUI opens up on the left of the screen instead of the right where the previous GUI was last seen.

Now I know about ini read and write on exit for positioning and stuff...as a matter of fact that's how I have my positioning set up to begin with, and I also have an idea of putting the GUI in a function and using wingetpos for this particular situation. But I would like to do this without putting the GUIs inside functions. Is that possible?

Thanks.

Share this post


Link to post
Share on other sites
Siao

You don't have to put any GUI in a function, but you'd have to do a

WinGetPos(oldGui)+WinMove(newGui) before showing the newGui obviously.


"be smart, drink your wine"

Share this post


Link to post
Share on other sites
Champak

Thanks for the direction, works great.

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.