I'm making a calculator. I've got a textbox which shows the output calculations (txtdisplay.Text
). But it only fits 8 characters so if I have a calculation with more than 8 characters it will be cut off and cannot be seen.
How do i make my result (e.g 120000000) into (1.2e+10) whenever the amount of characters reaches over 8?
Note that it's actually two questions, how do I make something happen when a textbox reaches 9 characters and how do I subsequently convert the content of the textbox to a scientific notation?