RUNWIN Service
Description
Passes <Object> as a command line string to the Windows CreateProcess function, to run a program.
Note: If <Object> is a program, the fully qualified path name of the file needs to be passed. Thus, passing WINWORD.EXE to run Microsoft Word will not work.
Parameters
Parameter | Description |
---|---|
<value> | (Optional.) An @FM-delimited array: Value <1> Mode to be passed to Windows CreateProcess function. If Value<1> is a negative number, then RUNWIN will work as a "modal" call (it will block all OpenInsight forms and will not return control to the caller until the calling application is completed). returnvalue is then an application exit code. See list of valid modes below <2> Name of callback function to be called when an activated now application is terminated. <3> Parameter to be passed to the callback function |
Valid mode values include:
Value | Mode |
---|---|
-1 | Modal |
0 | Hidden |
1 | Normal |
2 | ShowMinimized |
3 | Maximized |
4 | Show but do not activate |
5 | Show |
6 | Minimize |
7 | Show minimized but do not activate |
8 | Show Not Available |
9 | Restore |
Returns
An @FM-delimited array:
Value |
---|
<1> Exit code of the called process (only if called modally) |
<2> Instance handle of the called process |
<3> Thread ID of the called process |
<4> Process ID of the called process |
Remarks
For more information about RUNWIN, refer to EXITCODE in Chapter 4: Properties.
See Also
BEEP Service
DESTROY Service
REMOVEDIR Service
CHOOSECOLOR Service
FLUSH Service
RENAMEDIR Service
CHOOSEDIR Service
GET_EVENT Service
RENAMEFILE Service
CHOOSEFILE Service
GETLOGICALDRIVES Service
RUNHELP Service
CHOOSEFONT Service
MAKEDIR Service
RUNWIN Service
COPYFILE Service
OBJECTID Service
TEXTRECT Service
CREATE Service
OBJECTLIST Service
WINCOUNT Service
CURSOR Service
PRINTSETUP Service
Utility function
Example
declare function utility program = "C:\Program Files\Microsoft Office\Office10\WINWORD.EXE" mode = 6 ;* minimized rv = Utility("RUNWIN", program, mode)