Programmer Guide/Macro Library/SETWINDOWPOS: Difference between revisions

From STX Wiki
Jump to navigationJump to search
m (1 revision: Initial import)
No edit summary
Line 1: Line 1:
{{DISPLAYTITLE:{{SUBPAGENAME}}}}
{{DISPLAYTITLE:{{SUBPAGENAME}}}}__NOTOC__
==SETWINDOWPOS==
 
Set a new window position or size. If necessary, the position and size values are modified to fit the window onto the desktop (if <var>m</var> is not specified) or the monitor (if <var>m</var> is specified). If <var>wdw</var> is the name of a dialog, the position and size of the associated display is modified.
Set a new window position or size. If necessary, the position and size values are modified to fit the window onto the desktop (if <var>m</var> is not specified) or the monitor (if <var>m</var> is specified). If <var>wdw</var> is the name of a dialog, the position and size of the associated display is modified.


=====Usage:=====
====<code>SETWINDOWPOS <var>wdw</var> [ <var>x</var> <var>y</var> <var>w</var> <var>h</var> ] ; [ <var>m</var> ]</code>====
 
:;<var>wdw</var>: The id of a display or dialog item.
<code>SETWINDOWPOS <var>wdw</var> [ <var>x</var> <var>y</var> <var>w</var> <var>h</var> ] ; [ <var>m</var> ]</code>
:;<var>x,y</var>: The upper left corner position of the window in pixels (relative to the monitor <var>m</var>).
 
:;<var>w,h</var>: The width and height of the window in pixels.
=====Parameters:=====
:;<var>m</var>: The monitor to position the window <var>wdw</var> on (1 for the first monitor, 2 for the second ...).
 
;Result: The window position in the format <code>x y w h</code>
;<var>wdw</var>
;see also: [[Programmer Guide/Macro Library/GETWINDOEPOS|GETWINDOWPOS]], [[Programmer Guide/Macro Library/GETMONITOR|GETMONITOR]], [[Programmer Guide/Macro Library/GETDESKTOP|GETDESKTOP]]
 
:The id of a display or dialog item.
 
;<var>x,y</var>
 
:The upper left corner position of the window in pixels (relative to the monitor <var>m</var>).
 
;<var>w,h</var>
 
:The width and height of the window in pixels.
 
;<var>m</var>
 
:The monitor to position the window <var>wdw</var> on (1 for the first monitor, 2 for the second ...).
 
=====Result:=====
 
The window position in the following format:
 
<code>x y w h</code>
 
=====Examples:=====
 
<code>setwindowpos $#display 0 0 600 600 ; 1</code>
 
=====see also:=====
 
GETWINDOWPOS, [[Programmer Guide/Macro Library/GETMONITOR|GETMONITOR]], [[Programmer Guide/Macro Library/GETDESKTOP|GETDESKTOP]]

Revision as of 16:28, 15 May 2012

Set a new window position or size. If necessary, the position and size values are modified to fit the window onto the desktop (if m is not specified) or the monitor (if m is specified). If wdw is the name of a dialog, the position and size of the associated display is modified.

SETWINDOWPOS wdw [ x y w h ] ; [ m ]

wdw
The id of a display or dialog item.
x,y
The upper left corner position of the window in pixels (relative to the monitor m).
w,h
The width and height of the window in pixels.
m
The monitor to position the window wdw on (1 for the first monitor, 2 for the second ...).
Result
The window position in the format x y w h
see also
GETWINDOWPOS, GETMONITOR, GETDESKTOP

Navigation menu

Personal tools