WinStudio
IWSFormComponent interface
Sets or returns the number of decimal places in the value of a component.
object.DigitsAfterDecimal
Part |
Description |
object | Required. A reference to a form component object. |
If this value is zero (0), the system does not set or round to a number of decimal places, but uses all decimal places entered.
This property corresponds to and can be used to set the Decimal Point Position value on the component property sheet.
Sub Main() Dim myDecimal As Decimal ThisForm.Components("edit1").DigitsAfterDecimal = 4 ThisForm.Components("edit1").TruncateDecimal = True myDecimal = ThisForm.Components("edit1").GetValueOfDecimal(0) Application.ShowMessage("Display value: " & myDecimal) End Sub