UI_INFO Function
Syntax
Arguments
- option
Determines what information to return. Code has the following values:
- Code
Parameters
- 0
Returns the width of the screen in pixels
- 1
Returns the height of the screen in pixels
- 2
Returns the width of the Alpha Anywhere desktop in pixels
- 3
Returns the height of the Alpha Anywhere desktop in pixels
- 4
Returns the screen DPI x dimension (dots per inch x).
- 5
Returns the screen DPI in the y dimension (dot per inch y)
- 6
Returns the number of dialog units in the x dimension. (Primarily for internal use)
- 7
Returns the number of dialog units in the y dimension. (Primarily for internal use)
- 8
Returns the width of the client area (not including any vertically docked toolbars)
- 9
Returns the height of the client area (not including any horizontally docked toolbars and menus).
- 10
Returns the left edge of the client area, relative to the left edge of the screen
- 11
Returns the top of the client area, relative to the top of the screen.
- 12
Returns the position of the left edge of the Windows work area (accounting for any space taken up the Task Bar, if it is docked on the left).
- 13
Returns the position of the top edge of the Windows work area (accounting for any space taken up the Task Bar, if it is docked on the top).
- 14
Returns the width of the Windows work area (screen size minus space taken up by the Task Bar, if it is docked on the left or right).
- 15
Returns the height of the Windows work area (screen size minus space taken up the by Task Bar, if it docked on the top or bottom).
Description
UI_INFO() returns information about the size in pixels of the Alpha Anywhere main window and the screen resolution of the user's computer.
This following global function takes a window name as a parameter and it centers the window within the Alpha Anywhere desktop.
function center as L(window as C) p = obj(window) a5_height = UI_info(3) a5_width = UI_info(0) width = p.width height = p.height newtop = (a5_height - height)/2 newleft = (a5_width - width)/2 p.top = newtop p.left = newleft p.activate() end function
To change the size of the Alpha Anywhere window set the values of A5.HEIGHT and A5.WIDTH.
Limitations
Desktop applications only.
See Also