WireLess Studio Widgets Developer's Guide
WSWDG ContentsWStForm class reference

Show

This method shows a specific form on the mobile unit.

Ole declaration

VARIANT_BOOL ShowByName(LPCTSTR sFormName, VARIANT_BOOL bShowAsChild,VARIANT_BOOL bLoadFromFile);

VARIANT_BOOL ShowById(SHORT usFormId,VARIANT_BOOL bShowAsChild,VARIANT_BOOL bLoadFromFile);

Parameters
sFormName
The form's name.
usFormId
The form's id.
bShowAsChild
Specifies if the form will be shown as a child of the form that is currently being displayed. If this parameter is FALSE, the current form is destroyed and replaced by the specified form. If this parameter is TRUE the form is displayed as a child of the form that is currently being displayed. This parameter is omitted if the form is being shown or loaded on the form stack.
bLoadFromFile
This parameter indicates if the form must be reloaded from its file. This parameter is omitted if the form is not being shown or loaded on the form stack.
Return Value

On success, Show returns TRUE, FALSE otherwise. To get extended information, call WStError::GetLastErrorCode.

Remarks

ShowForm calls SaveToTerminal if the form hasn't been serialized and transferred.

If the form was serialized before, all the current modifications of the form and the widgets attached to it are discarded.

Example
C#
using WirelessStudioOleWidgets;
WStFactory oFactory = new WStFactory();
WStForm oForm = new WStForm ();
short formId = 10;
short lineId = 15;
oFactory.CreateFormById(formId);
oFactory.CreateWidgetById((short)WSTFactoryConstants.WS_LINE, lineId , "MyLine", 15, 15, 30, 30, "");
oForm.AddObjectBydId(formId, lineId ;
oForm.SaveToTerminalById(formId);
oForm.ShowById(formId, true, true);
Visual Basic 6 (Full Example: BitmapDemoModule.bas.txt)
Public wsForm As New WStForm
...
If Not wsForm.SaveToTerminalByName("myForm") Then
    Exit Sub
End If

bResult = wsForm.ShowByName("myForm", True, True)
...	
See also

SaveToTerminal | CommitChanges | WStFactory::CreateWidget | WStFactory::CreateForm

WStWiget class reference | WStForm class reference | WStFactory class reference | WStError class reference