WireLess Studio Widgets Developer's Guide
WSWDG ContentsWStForm class reference

RestoreInitialState

Call this method to restore the initial state of the form that is currently being displayed. When a form is reset on the mobile unit, the form is destroyed and reloaded from its source file (the form's source file is transferred by calling SaveToTerminal).

Ole declaration

VARIANT_BOOL RestoreInitialState(void);

Parameters
Return Value

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

Remarks
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);
oForm.RestoreInitialState();
Visual Basic 6 (Full Example: BasicPropertiesDemoModule.bas.txt)
Public wsForm As New WStForm
...
Case "resetButton"
            wsForm.RestoreInitialState
...	
See also

Show | SaveToTerminal | CommitChanges

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