|
Switch the basic form displayed in View control.
Syntax 1
OpenForm(
basedFormName
[,systemParam]
[,openParam]
)
Parameters
basedFormName
|
|
Type:
|
character
|
|
Base form name. The name of the form to embed in the view. The view will be created based on the base form.
|
systemParam
|
|
Type:
|
General purpose
|
|
System parameters. Each element is "parameter name:value". To specify multiple elements, specify them as an array like this: c("parameter name 1:value 1", "parameter name 2:value 2",...). Note that this parameter does not support map values.
Parameters
|
Default value
|
explanation
|
formName
|
""
|
Specify the name of the form after it is displayed.This is the new form name to reference from the script. If omitted, the name specified in basedFormName will be used. It must not overlap with the currently displayed form name.
|
stretch
|
""
|
Expand the form size to fit the size of View control.
NONE
|
Don't stretch.
|
STRETCH_FULL
|
Stretch and display to fit the size of View control.
|
STRETCH_KEEPRATE
|
The image will be stretched to fit the size of View control (maintaining aspect ratio).
|
RESIZE_FULL
|
Adjust the form size to fit the size of View control.
|
RESIZE_KEEPRATE
|
Adjust the form size to fit the size of View control (maintaining aspect ratio).
|
FORM
|
Matches the setting of the form's Strech property.
|
* If this argument is not specified or if an empty string is specified, the setting of the Strech property of View control will be used.
*Difference between STRETCH_XXX and RESIZE_XXX
In the case of STRETCH_XXX, when the screen is expanded, the size of the form (Width/Height property) remains the same, and the zoom ratio is automatically adjusted to stretch the display. Therefore, all images and text are expanded or reduced. On the other hand, in the case of RESIZE_XXX, the zoom ratio remains fixed at 100%, and the actual size of the form (Width/Height property) is automatically adjusted. Therefore, the size of controls and text remains the same. If you want to automatically adjust the position and size of controls on the screen when the screen is expanded, set the AutoResizeX/AutoResizeY property of each control. For example, if you specify "RIGHT" for AutoResizeX, the position of the control will automatically move to the right side when the screen is expanded.
|
visualTheme
|
""
|
Specifies the visual theme name in text.
|
Example: When there is only one element
this.OpenForm("Form01","formName:frmForm01");
Example: In the case of multiple elements
this.OpenForm("Form01",c("formName:frmForm01","stretch:RESIZE_FULL"));
|
openParam
|
|
Type:
|
General purpose
|
|
Open parameter. Each element is "parameter name:value". To specify an array, use c("parameter name 1:value 1", "parameter name 2:value 2",...). It is also possible to pass a map value generated by the MAP route method.
The information passed in the open parameters can be obtained from the called form's script using the GetOpenParam method.
|
Return Value
|
|
Type:
|
Boolean
|
|
FALSE - Failure. TRUE - Success.
|
Explanation
It is used to switch the currently embedded base form to another base form. It can also be called during execution.
The argument basedFormName usually specifies the name of the original form (e.g. "Form01").
If the same form name exists across multiple folders, you can specify it as folder name.form name (e.g. "Folder01.Form01").
|
Syntax 2
OpenForm(
basedFormName
[,formName]
[,stretch]
[,openParam]
)
Parameters
basedFormName
|
|
Type:
|
character
|
|
Base form name. The name of the form to embed in the view. The view will be created based on the base form.
|
formName
|
|
Type:
|
character
|
|
Form name after embedding (any name). Specify the new form name to be referenced from the script. If omitted, the name specified in basedFormName will be the form name to be referenced from the script. This form name must not overlap with the main form or the form name of the open dialog.
|
stretch
|
|
Type:
|
character
|
|
Expand the form size to fit the size of View control.
"NONE" - no stretching
"STRETCH_FULL" - Stretch to fit the size of View control
"STRETCH_KEEPRATE" - Stretch to fit the size of View control (maintain aspect ratio)
"RESIZE_FULL" - Adjust form size to fit View control
"RESIZE_KEEPRATE" - Adjust form size to fit View control (keep aspect ratio)
FORM: Matches the setting of the form's Strech property
* If this argument is not specified or if an empty string is specified, the setting of the Strech property of View control will be used.
*Difference between STRETCH_XXX and RESIZE_XXX
In the case of STRETCH_XXX, when the screen is expanded, the size of the form (Width/Height property) remains the same, and the zoom ratio is automatically adjusted to stretch the display. Therefore, all images and text are expanded or reduced. On the other hand, in the case of RESIZE_XXX, the zoom ratio remains fixed at 100%, and the actual size of the form (Width/Height property) is automatically adjusted. Therefore, the size of controls and text remains the same. If you want to automatically adjust the position and size of controls on the screen when the screen is expanded, set the AutoResizeX/AutoResizeY property of each control. For example, if you specify "RIGHT" for AutoResizeX, the position of the control will automatically move to the right side when the screen is expanded.
|
openParam
|
|
Type:
|
General purpose
|
|
Open parameter. Each element is "parameter name:value". To specify an array, use c("parameter name 1:value 1", "parameter name 2:value 2",...). It is also possible to pass a map value generated by the MAP route method.
The information passed in the open parameters can be obtained from the called form's script using the GetOpenParam method.
|
Return Value
|
|
Type:
|
Boolean
|
|
FALSE - Failure. TRUE - Success.
|
Explanation
Syntax 2 of the OpenForm method is the old calling format prior to Ver6REV12.
It is used to switch the currently embedded base form to another base form. It can also be called during execution.
The argument basedFormName usually specifies the name of the original form (e.g. "Form01").
If the same form name exists across multiple folders, you can specify it as folder name.form name (e.g. "Folder01.Form01").
|
reference
OpenForm
GetCurrentBasedForm
GetCurrentForm
SetStretch
GetZoom
SetZoom
ResetZoom
TakeThumbnail
PrintThumbnail
GetFormHeight
GetFormWidth
GetDialogSize
KillCurrentFocus
MoveTabStop
RefreshTabOrder
OpenHomeForm
OpenPrevForm
OpenNextForm
IsHavePrevForm
IsHaveNextForm
ClearFormHistory
MoveWindow
|