N Nathan Sokalski Oct 8, 2008 #2 Take a look at the ToString() method. You will need to include a format string as the parameter. For more information on numeric format strings, see: ms-help://MS.VSCC.v80/MS.MSDN.v80/MS.VisualStudio.v80.en/dv_fxfund/html/6f74fd32-6c6b-48ed-8241-3c2b86dea5f4.htm OR http://msdn.microsoft.com/en-us/library/0c899ak8(VS.80).aspx I believe a format string that will do what you want is "#.#00", so you would probably do something like: txtMyTextBox.Text=myvalue.ToString("#.#00") Good Luck!
Take a look at the ToString() method. You will need to include a format string as the parameter. For more information on numeric format strings, see: ms-help://MS.VSCC.v80/MS.MSDN.v80/MS.VisualStudio.v80.en/dv_fxfund/html/6f74fd32-6c6b-48ed-8241-3c2b86dea5f4.htm OR http://msdn.microsoft.com/en-us/library/0c899ak8(VS.80).aspx I believe a format string that will do what you want is "#.#00", so you would probably do something like: txtMyTextBox.Text=myvalue.ToString("#.#00") Good Luck!
K kimiraikkonen Oct 8, 2008 #4 How do I format the textbox to 3 decimal point all the time? Regards, Tee Click to expand... As mentioned previously, use a masked textbox control, then in properties windows set its Mask property to "#.#00". HTH, Onur Güzel
How do I format the textbox to 3 decimal point all the time? Regards, Tee Click to expand... As mentioned previously, use a masked textbox control, then in properties windows set its Mask property to "#.#00". HTH, Onur Güzel