SetFormFieldDefaultValueA

Form fields

Description

The trailing A denotes the ANSI (char) DLL entry point; the ActiveX/COM surface exposes only the Unicode form. Behaviour is identical to SetFormFieldDefaultValue and string arguments are interpreted using the current SetAnsiMode code page

Sets the default value of the field. This is the value which is shown when the reset button is pressed, if one is on the form

Syntax

Delphi

Function DLSetFormFieldDefaultValueA(InstanceID, Index: Integer; NewDefaultValue: PAnsiChar): Integer;

DLL

int DLSetFormFieldDefaultValueA(int InstanceID, int Index, const char * NewDefaultValue);

Parameters

IndexThe index of the form field to change
NewDefaultValueThe new default value for the form field. For multi-line text fields you can use Chr(13) or Chr(13) + Chr(10) to force a line feed between lines

Return values

0The form field could not be found
1The default value of the specified form field was set successfully