WireLess Studio Widgets Developer's Guide
WSWDG ContentsWStFactory class reference

CreateForm

Call this method to create a new form. Once a form is created it can be manipulated using the WStForm object.

A form is a modal dialog that can be used to display any widget created with CreateWidget, which can be attached to a form by calling WStForm::AddObject.

Ole declaration

VARIANT_BOOL CreateFormByName(LPCTSTR sName);

VARIANT_BOOL CreateFormById(SHORT usFormId);

Parameters
sName
The name of the form.
usFormId
The id of the form.
Return Value

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

Remarks

Forms created using CreateFormByName can be modified using only the methods with the suffix ByName.

Forms created using CreateFormById can be modified using only the methods with the suffix ById.

The first id that can be to create a form is 11.

Currently, only 38 forms per application can be created.

Example
C#
using WirelessStudioOleWidgets;
WStFactory oFactory = new WStFactory();
short iFormId = 5;
oFactory.CreateFormById(iFormId);
Visual Basic 6 (Full Example: BasicPropertiesDemoModule.bas.txt)
Public wsForm As New WStForm
Public wsFactory As New WStFactory		
...
'Form creation and customization
wsFactory.CreateFormByName "myForm"
wsForm.SetCoordTypeByName "myForm", WS_FORM_CT_BYPERCENTAGE
...
See also

FindForm | CreateWidget | WStForm::SetCoordType

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