Search the Community
Showing results for tags 'set relative coordinates'.
Found 1 result
Hi, I am referring to code being presented in this thread () that discusses about enabling windows to lock to relative positions when moving around. I am requesting help in these areas: 1. Is it possible for the secondary window to not have both its relative X and Y positions set to the primary window's coordinates, when minimized? Example code: Func showBottomForm($userID, $hWindow) ; Bottom form $g_hBottomForm = GUICreate("Bottom Form", $CONST_NORMAL_WIDTH, $CONST_NORMAL_HEIGHT, -1, WinGetPos($hWindow) + WinGetPos($hWindow), -1, $WS_EX_TOOLWINDOW) $hButton_Form = GUICtrlCreateButton("Bottom Form Button", 80, 10, 120, 30) GUISetState() EndFunc ;==>showBottomForm What this means is that if I moved the secondary window around before minimizing the primary window and then re-maximize the primary window again, the secondary window's position could be set correctly. But if the secondary window is not moved and then the primary window is minimized/re-maximized immediately, the secondary window's position gets locked to the X/Y coordinates of the primary window. 2. Is it possible for the secondary window to be shown together with the primary window when the primary window is re-maximized in the presence of other application windows? What happens now is that the secondary window (based on above code) could not be seen if there are other windows shown. But if every window is minimized (except my AutoIt app), then I can see the secondary window. What changes are needed? I tried the following: GUICreate("Bottom Form", $CONST_NORMAL_WIDTH, $CONST_NORMAL_HEIGHT, -1, WinGetPos($hWindow) + WinGetPos($hWindow), -1, BitOR($WS_EX_TOOLWINDOW, $WS_EX_CLIENTEDGE)) This didn't really cause much change, so I am kinda stumped now. All help appreciated.