

If the dialog box has no owner and the active window is not in the same application as the dialog box, the dialog box appears on the primary monitor.Īppears on the monitor of the window that owns it. If it has no owner and the active window and the dialog box are in the same application, the dialog box appears on the monitor of the currently active window. The ALT-TAB key combination displays a window on the monitor that has the currently active window.Īppears on the monitor that contains the largest part of the corresponding menu item.Īppears on the monitor where the right click occurred.Īppears on the monitor that contains the rectangle of the combo box.Īppears on the monitor of the window that owns it.If it is defined with DS_CENTERMOUSE style, it appears on the monitor with the mouse. ObjectĬreateWindow(Ex) displays a window on the monitor that contains the largest part of the window.Maximizes on the monitor that contains the largest part of the window before it was minimized. The following table shows how the monitor is chosen.
#Win 10 find mouse coordinates autohotkey windows
To minimize this problem, the system displays menus and new and maximized windows on one monitor. On systems with multiple screens which have different DPI settings, the returned position may be different than expected due to OS DPI scaling.A window or menu that is on more than one monitor causes visual disruption for a viewer. RemarksĪny of the output variables may be omitted if the corresponding information is not needed. However, it is less accurate for other purposes such as detecting controls inside a GroupBox control.Ģ : Stores the control's HWND in OutputVarControl rather than the control's ClassNN.įor example, to put both options into effect, the Flag parameter must be set to 3. This method correctly retrieves the active/topmost child window of an Multiple Document Interface (MDI) application such as SysEdit or TextPad. To change this behavior, add up one or both of the following digits:ġ: Uses a simpler method to determine OutputVarControl. If omitted or 0, the command uses the default method to determine OutputVarControl and stores the control's ClassNN. The window under the mouse cursor does not have to be active for a control to be detected. The names of controls should always match those shown by the version of Window Spy distributed with (but not necessarily older versions of Window Spy). If the control cannot be determined, this variable will be made blank. This optional parameter is the name of the output variable in which to store the name (ClassNN) of the control under the mouse cursor. The window does not have to be active to be detected. If the window cannot be determined, this variable will be made blank. This optional parameter is the name of the output variable in which to store the unique ID number of the window under the mouse cursor. The retrieved coordinates are relative to the active window unless CoordMode was used to change to screen coordinates. The names of the output variables in which to store the X and Y coordinates. MouseGetPos, OutputVarX, OutputVarY, OutputVarWin, OutputVarControl, Flag Parameters OutputVarX, OutputVarY

Retrieves the current position of the mouse cursor, and optionally which window and control it is hovering over. MouseGetPos - Syntax & Usage | AutoHotkey MouseGetPos
