Having :
var
Difference: DWORD // difference shows in milliseconds
// List.Items.Count can be any 0 to ########
[...]
sb.panels[2].Text := FloatToStr((((List.Items.Count) / difference) / 1000));
I want to format the resulting text to any ###.## (two decimals). Using FloatToStrF is no success (does’nt seem to work with DWORD).
Just wondering if this is a problem with math rather than formatting. Why are you dividing the number of items by 1000? Do you mean to divide milliseconds (your Difference variable) by 1000? Maybe this is what you want:
Of course, you’ll still want to format the result. You’ll need this as a variable or class property:
then, you’ll need to do this once, e.g. in
FormShow:finally, this should work: