Show pageOld revisionsBacklinksBack to top This page is read only. You can view the source, but not change it. Ask your administrator if you think this is wrong. ====== Rev_Utility Function ====== ==== Description ==== The Rev_Utility function provides an API for various operating system functions. ==== Syntax ==== returnValue = Rev_Utility( method, p1...p6 ) ==== Parameters ==== The function has the following parameters: ^Parameter^Description^ |method|A valid Rev_Utility method. BORDERWIDTHS, ERRORTEXT, FSERROR, GETSYSTEMFONTS, SETREADONLY, SETWINDOWSIZE, SYSTEMSIZE, TOKENIZE, VERIFYPROC.| |param1...\\ \\ param6|Each method has different parameter requirements.| === Methods === ^Value^Description^ |BORDERWIDTHS|This method examines the style of the window passed in first parameter and returns the width of the window borders for that particular style.| |ERRORTEXT|This method returns the error text associated with an error code. The error code/error text must exist within the REVERROR.DAT file.| |FSERROR|When an error has occurred this message may called to return the error details to the calling routine.| |GETSYSTEMFONTS|Returns an @fm-delimited list of fonts used in the current theme.| |SETREADONLY|This method sets or unsets a control's read only style.| |SETWINDOWSIZE|This method sets a window's SIZE without altering it's visibility.| |SYSTEMSIZE|This method returns the SIZE of the desktop area as reported by the system.| |TOKENIZE|This method tokenizes a string based upon a set of passed delimiters.| |VERIFYPROC|This method validates if a procedure name is a valid system program.| === Parameters === ^Method^Parameters^ |BORDERWIDTHS|A Window Name, e.g. EXAMPLES_MAIN| |ERRORTEXT|An Error Code as defined in the REVERROR.DAT file. e.g. FS100| |FSERROR|Null| |GETSYSTEMFONTS|Null| |SETREADONLY|__Parameter__ - __Description__\\ param1 - An @fm-delimited list of controls.\\ param2 - A boolean value.\\ \\ When TRUE$ all the controls in p1 are set to ReadOnly.\\ \\ When FALSE$, the ReadOnly is turned off for all the controls in p1.| |SETWINDOWSIZE|__Parameter__ - __Description__\\ param1 - The Window Name.\\ param2 - An @fm delimited array.\\ \\ <1> X (offset from the left side of the screen)\\ <2> Y (offset from the top of the screen)\\ <3> W (Width of the window)\\ <4> H (Height of the window)| |SYSTEMSIZE|Null| |TOKENIZE| | |VERIFYPROC| | ==== Returns ==== ^Method^Return Value^ |BORDERWIDTHS|An @fm-delimited array of window borders for the particular style.\\ \\ <1> The height of the horizontal border of a window frame.\\ <2> The height of the vertical border of a window frame.\\ \\ The values returned are in pixels.| |ERRORTEXT|The Error description for the corresponding error code in the REVERROR.DAT file.| |FSERROR|The FSError and description from the REVERROR.DAT file.| |GETSYSTEMFONTS|Returns an @fm-delimited list of fonts used in the current theme.\\ \\ <1> Caption Font\\ <2> Small Caption Font\\ <3> Menu Font\\ <4> Status Font\\ <5> Message Font| |SETREADONLY|Null| |SETWINDOWSIZE|Null| |SYSTEMSIZE|The size of the desktop area, after allowing for the system tray and other toolbars.\\ \\ <1> X (offset from the left side of the screen)\\ <2> Y (offset from the top of the screen)\\ <3> W (Width of the available desktop)\\ <4> H (Height of the available desktop)| |TOKENIZE|This method tokenizes a string based upon a set of passed delimiters.\\ \\ * The string is also checked to see if quotes are balanced.| |VERIFYPROC|| ==== Examples ==== <code> * BORDERWIDTHS Example borderWidths = Rev_Utility("BORDERWIDTHS","EXAMPLES_MAIN") hBorder = borderWidths<1> vBorder = borderWidths<2> </code> <code> *FSERROR Example Open "JIMMY_TWO_TIMES" To f_jimmy_2x else error = Rev_Utility( "FSERROR" ) end * The error returned if the file does not exist is: * FS401 - The "JIMMY_TWO_TIMES" table has not been created or attached. </code> <code> * GETSYSTEMFONTS Example systemFonts = Rev_Utility("GETSYSTEMFONTS") </code> <code> * ERRORTEXT Example Open "JIMMY_TWO_TIMES" To f_johnny else errorCode = @file.error<1> errorText = Rev_Utility( "ERRORTEXT", errorCode ) end /* The errorText variable should be 401 - The "%1%" table has not been created or attached. */ </code> <code> * SETREADONLY Example * Set all the controls on a form to Read Only. Ctrlmap = Get_Property(@window, "CTRLMAP") x = Rev_Utility( "SETREADONLY", ctrlmap, TRUE$) </code> guides/programming/programmers_reference_manual/rev_utility.txt Last modified: 2024/06/19 20:20by 127.0.0.1