Jump to content
Sign in to follow this  
zcoacoaz

Window that Follows Another Window

Recommended Posts

this code will create two black GUIs and the smaller one will follow the bigger resizable one and center itself above the bigger GUI

#include <GUIConstants.au3>
Opt ( "GUIOnEventMode", 1 )
GuiCreate("Parent",400,80,350,300)
GUISetOnEvent ( $GUI_EVENT_CLOSE, "Quit" )
GUISetState ( )
GUICreate ( "Child", 600, 400, -1, -1, $WS_SIZEBOX + $WS_SYSMENU )
GUISetOnEvent ( $GUI_EVENT_CLOSE, "Quit" )
GUISetState ( )

While 1
    $MovePos = WinGetPos ( "Child" )
    $X = ($MovePos[2]-400)/2+$MovePos[0]
    WinMove ( "Parent", "", $X , $MovePos[1] - 111 )
WEnd

Func Quit()
    Exit
EndFunc

[font="Times"] If anyone remembers me, I am back. Maybe to stay, maybe not.----------------------------------------------------------------------------------------------------------[/font][font="Times"]Things I am proud of: Pong! in AutoIt | SearchbarMy website: F.R.I.E.S.A little website that is trying to get started: http://thepiratelounge.net/ (not mine)[/font][font="Times"] ----------------------------------------------------------------------------------------------------------[/font][font="Arial"]The newbies need to stop stealing avatars!!! It is confusing!![/font]

Share this post


Link to post
Share on other sites

xenogis had the script installed in my video player, but when i close the first video adn open a new one, the script stops working.

@Xenogis pleas check how to fix this.

can't whe just use the child style for this??

p.s. child style has a BAD help file


*If u thought life couldn't get worse, u meet me *<guy> What would you give my little sister to unzip ?<friend> 10 bucks<guy> No, i mean like Winzip...

Share this post


Link to post
Share on other sites

i didn't know that, i can probably fix it for you easily though. I will pm you when i make a version that does it right


[font="Times"] If anyone remembers me, I am back. Maybe to stay, maybe not.----------------------------------------------------------------------------------------------------------[/font][font="Times"]Things I am proud of: Pong! in AutoIt | SearchbarMy website: F.R.I.E.S.A little website that is trying to get started: http://thepiratelounge.net/ (not mine)[/font][font="Times"] ----------------------------------------------------------------------------------------------------------[/font][font="Arial"]The newbies need to stop stealing avatars!!! It is confusing!![/font]

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  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...