ph_setframe PowerHome formula function
Description
Allows you to programmatically control the state and size/position of the PowerHome main application window.
Syntax
ph_setframe ( state, x, y, width, height )
Argument Description
state Integer. Controls the state of the frame. Use 0 for normal. Use 1 for minimized. Use 2 for maximized.
x Integer. The x position of the upper left corner of the frame. Set this value to a negative number to not change the x position.
y Integer. The y position of the upper left corner of the frame. Set this value to a negative number to not change the y position.
width Integer. The desired width of the frame. Set this value to 0 or negative to not change the width.
height Integer. The desired height of the frame. Set this value to 0 or negative to not change the height.
Return value
Integer. Returns 0 if successful. Returns 1 if the state parm is 0 and the frame is currently in kiosk mode (see ph_setmode  function). Returns 1 if PowerHome is currently in kiosk mode and any of the x, y, width, or height parms are not 0.
Usage
Use this function to control size, position, and state of the main PowerHome application window.
Examples
The following examples demonstrate typical syntax/usage for this function.
ph_setframe (0,100,100,1200,1000)
The above example will set the main PowerHome window to normal mode and position it at 100,100 with dimensions of 1200 x 1000.