WireLess Studio Widgets Developer's Guide
WSWDG ContentsWStForm class reference

SaveToTerminal

Call this method to serialize and transfer a form to the mobile unit.

Ole declaration

VARIANT_BOOL SaveToTerminalByName(LPCTSTR sFormName);

VARIANT_BOOL SaveToTerminalById(SHORT usFormId);

Parameters
sFormName
The form's name.
usFormId
The form's id.
Return Value

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

Remarks

Once this method is call no widgets can be attached to the target form.

This methods is automatically called by Show if the form hasn't been serialized and transferred before.

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);
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

Show | CommitChanges | WStFactory::CreateWidget | WStFactory::CreateForm

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